<style scoped >
    table{
        border-radius: 3px;
        color: #7a7676;
    }
    tr th{
        text-align: center;
        font-size: 12px;
        font-weight: normal;
        border-right: 1px solid #e3e8ee;
        border-bottom: 1px solid #e3e8ee;
        background-color: #f1f4f9;
        height: 27px;
        font-weight: bold;
        color: #2e2f31;
    }
    tr.trhover td{
        text-align: center;
        font-size: 12px;
        font-weight: normal;
        background-color: #fff;
        transition: background-color .2s ease-in-out;
        border-right: 1px solid #e3e8ee;
        border-bottom: 1px solid #e3e8ee;
    }
    .trhover:nth-child(2n+1) td{
        background-color: #f5f7f9;
    }
    .trhover:nth-child(n+1):hover td{
        background-color: #ebf7ff;
    }
    .ivu-input{
        width: 90%;
    }
    /*仓库维护弹窗*/
    .ivu-modal-body .exdepot .ivu-row .ivu-col .ivu-btn{
        background-color: #37b3b3;
        color: #ffffff;
        border: 1px solid #37b3b3;
    }
    .ivu-modal-body .exdepot .ivu-row .ivu-col .ivu-btn:hover{ background-color: #019ea3;}
    .ivu-modal-body .exboxnum .ivu-row .ivu-col .ivu-btn:hover{background-color: #019ea3;}
    .exdepot .depotsearchform{padding-top: 20px;float: left;width: 928px;}
    .adddepot .ivu-row{ padding:40px 0 20px;}
    .adddepot .ivu-row .ivu-col .ivu-form-item .ivu-form-item-content .ivu-input-wrapper{width: 90%;}
    .adddepot .ivu-row .ivu-col .ivu-form-item .ivu-form-item-content .ivu-select{width: 90%;}

    /*箱型维护样式*/
    .ivu-modal-body .exboxnum .ivu-row .ivu-col .ivu-btn{
        background-color: #37b3b3;
        color: #ffffff;
        border: 1px solid #37b3b3;
    }
    .ivu-modal-body .exboxnum .ivu-row .ivu-col .ivu-btn:hover{  color: #ffffff;  }
    .exboxnum .boxsearchform{padding-top: 20px;float: left;width: 828px;}
    .addBox{padding: 25px 43px 0px;}
    .addBox .ivu-row .ivu-col .ivu-form-item .ivu-form-item-content .ivu-input-wrapper{width: 90%;}
    /*查看物流详情*/
    .shippingdetail{padding: 15px 0px 9px;height:450px;overflow-y: auto;}
    .shippingdetail h4{
        padding: 0 15px;
        line-height: 33px;
        border: 1px solid #e5eaee;
        background:-webkit-gradient(linear, 0 0, 0 100%, from(#fbfbfb), to(#f5f5f5));
    }
    .shippingdetail h4 .shippingtitle{
        color: #37b3b3;
        font-weight: normal;
        font-size: 14px;
    }
    .datilbody{
        padding: 12px 25px 15px;
    }
    .nobutton1 {padding-top: 0px;padding-bottom: 10px;}
    .datilbody .ivu-col .ivu-form-item .ivu-form-item-content .ivu-input-wrapper{width: 90%;}
    .datilbody .ivu-col .ivu-form-item .ivu-form-item-content .ivu-select{width: 90%;}
    .datilbody .remark{
        height: 90px;
        border: 1px solid #cccccc;
        -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
        border-radius: 4px;
        line-height: 24px;
        padding:0 5px;
    }
    .nobutton .ivu-form-item{margin-bottom:0;}
    /*导出明细*/
    .exportbody .export{padding:60px 35px 0;}
    .exportbody .export .ivu-form-item .ivu-form-item-content .ivu-date-picker{width: 90%;display: inline-block;}
    .exportbody .export .ivu-form-item .ivu-form-item-content .ivu-select{width: 90%;}
    .exportbody .export .ivu-form-item .ivu-form-item-content .ivu-input-wrapper{width: 90%;}
    .exportbody .footer{padding-bottom: 50px;}
    .exportbody .footer button.save{width: 150px;}
    /*运单维护*/
    .tendwaybill .ivu-upload{display: inline-block;}
    .tendwaybill .tendbutton{width: 80px;color: #7a7676;background-color: #ffffff;margin-bottom: 12px;}
    .tendwaybill .tendbutton:hover{color: #37b3b3;border:1px solid #37b3b3;}
    /*签名*/
    .autopragh .autopraghdetail{border-bottom: 1px solid #eeeeee;height: 400px;}
    .autopragh .autopraghdetail img{
        display:block;
        width:710px;
        height:400px;
    }
    .autopragh .footer{padding: 55px 0 45px;}
    /*物流编号详情*/
    .logistics .logisticsdetail{padding: 15px 0 0;height:500px;overflow-y: auto;}
    .logisticsdetail h4{
        padding: 0 15px;
        line-height: 33px;
        border: 1px solid #e5eaee;
        background:-webkit-gradient(linear, 0 0, 0 100%, from(#fbfbfb), to(#f5f5f5));
    }

    .logisticsdetail h4 .logisticstitle{
        color: #37b3b3;
        font-weight: normal;
        font-size: 14px;
    }
    .logisticsbody{padding: 15px 16px 20px; }
    .logisticsbody .ivu-form-item{margin-bottom: 0px;}
    /*驳回原因*/
    .adddepot.boh .ivu-form-item .ivu-form-item-content .ivu-input-wrapper{  width:90%;}
    /*物流单号详情   start*/
    .logisticy{
        position: absolute;
        left: 0px;
        top: 0px;
        z-index: 1020;
    }
    .center .logDelLeft{
        width:117px;
        height:107px;
    }
    .center .logDelLeft img{
        width: 100%;
        height: auto;
        margin-top: 8px;
    }
    .center .logDelRight{
        width: 253px;
        height: 107px;
        margin-top: 12px;
    }
    .center .logDetailtop{
        height: 107px;
        width: 100%;
        display:flex;
    }
    .center  .logDetailBottom{
        width:100%;
        height:284px;
        overflow-y: auto;
        background: #fafafa;
    }
    .center .logDelRight p span:nth-child(1){
        line-height:20px;
        color: #a3a3a3;
        text-align: left;
        display: inline-block;
        width: 65px;
        font-size:12px;
    }
    .center .logDelRight  p span:nth-child(2){
        color:#333;
        font-size:12px;
    }
    .center  .logDetailBottom li{
        display: flex;
        position: relative;
    }
    .center  .timeLine{
        display: block;
        width: 1px;
        height: 54px;
        position: absolute;
        left: 13px;
        top: 40px;
        background: #eeeeee;
    }
    .center  .logDetailBottom .timeLeft{
        width:10px;
        height:10px;
        border-radius: 50px;
        background: #eeebeb;
        margin:24px 9px;
    }
    .center  .logDetailBottom .timeRight{
        display: flex;
        border-bottom:1px solid #ccc;
        width:320px;
        font-size:12px;
    }
    .center  .logDetailBottom  .timeRight  div:nth-child(1){
        width:34px;
        height:16px;
        background:#eeebeb ;
        margin: 22px 0;
        margin-right: 7px;
        color:#fff;
        text-align: center;
        line-height: 16px;
        visibility: hidden;
    }
    .center  .logDetailBottom .timeRight div:nth-child(2) {
        margin: 10px  0px;
        color: #a3a3a3;
        width:288px;
    }
    .center  .logDetailBottom  li:nth-child(1) .timeLeft{
        width:10px;
        height:10px;
        border-radius: 50px;
        background: #3eb4b2;
        margin:24px 9px;
    }
    .center  .logDetailBottom li:nth-child(1) .timeRight{
        display: flex;
        border-bottom:1px solid #ebebeb;
        font-size:12px;
    }
    .center  .logDetailBottom li:nth-child(1) .timeRight div:nth-child(1){
        width:34px;
        height:16px;
        background:#37b3b3 ;
        margin: 22px 0;
        margin-right: 7px;
        color:#fff;
        text-align: center;
        line-height: 16px;
        visibility: visible;
    }
    .center  .logDetailBottom  li:nth-child(1) .timeRight div:nth-child(2) {
        margin: 10px  0px;
        color: #3eb4b2;
    }
</style>
<template>
    <div class="console-product">
        <Row class="position noprint">
            <i-col :xs="12" :sm="10" :md="8" :lg="6" >
                <div class="ivu-breadcrumb">
                    <span class="ivu-breadcrumb-item-link">当前位置：</span>
                    <span class="ivu-breadcrumb-item-link">物流中心</span>
                    <span class="ivu-breadcrumb-item-separator">/</span>
                    <span class="ivu-breadcrumb-item-link">物流配送</span>
                </div>
                <Modal class-name="popup"  v-model="logisticsModal"  @on-cancel="clearLogistics('logisticsValidate')" width="810" class="logistics" :mask-closable="false">
                    <p slot="header" style="color: #eeebeb;" v-drag>
                        <span>详情</span>
                    </p>
                    <div  class="logisticsdetail">
                        <Form  ref="logisticsValidate" :model="logisticsValidate" label-position="left" >
                            <h4>
                                <span class="logisticstitle">基本信息</span>
                            </h4>
                            <div class="logisticsbody">
                                <Row>
                                <i-col span="8">
                                    <Form-item label="物流单号：">
                                        <span class="logisticsbody_span">{{logisticsValidate.code}}</span>
                                    </Form-item>
                                </i-col>
                                    <i-col span="8">
                                        <Form-item label="运单号：">
                                            <span class="logisticsbody_span" v-if="notrack">{{logisticsValidate.waybillno}}</span>
                                            <span class="logisticsbody_span" v-if="track" style="color: #37b3b3;cursor: pointer;" @click="trackExpress(logisticsValidate.waybillno)">{{logisticsValidate.waybillno}}</span>
                                            <Modal class-name="popup"  v-model="logDetailModal" width="410"  @on-cancel="logDetail" :mask-closable="false" class="logisticy">
                                                <p slot="header" style="color: #eeebeb;" v-drag>
                                                    <span>物流详情</span>
                                                </p>
                                                <div class="center">
                                                    <div  class="logDetailtop" >
                                                        <div class="logDelLeft"  v-if="logisticsValidate.expressCode" >
                                                            <img :src="'../../src/images/print/'+logisticsValidate.expressCode+'.png'" alt="">
                                                        </div>
                                                        <div class="logDelRight">
                                                            <p><span>快递公司：</span><span>{{logisticsValidate.expressName}}</span></p>
                                                            <p><span>物流编号：</span><span>{{logisticsValidate.code}}</span></p>
                                                            <p><span>运单号：</span><span>{{logisticsValidate.waybillno}}</span></p>
                                                            <p><span>联系人：</span><span>{{logisticsValidate.contact}}</span></p>
                                                        </div>

                                                    </div>
                                                    <!--物流时间轴-->
                                                    <ul class="logDetailBottom">
                                                        <li v-if="logDetailData.length != 0"  v-for="infor  in  logDetailData">
                                                            <span class="timeLine"></span>
                                                            <div class="timeLeft"></div>
                                                            <div class="timeRight">
                                                                <div>最新</div>
                                                                <div>
                                                                    <p>{{infor.ftime}}</p>
                                                                    <p>{{infor.context}}</p>
                                                                </div>
                                                            </div>
                                                        </li>
                                                        <li v-if="logDetailData.length == 0" style="padding: 25px">
                                                            :( 该单号暂无物流进展，请稍后再试，或检查公司和单号是否有误。
                                                        </li>
                                                    </ul>
                                                </div>
                                                <div slot="footer"></div>
                                            </Modal>
                                    </Form-item>
                                </i-col>
                                <i-col span="8">
                                    <Form-item label="状态：">
                                        <span class="logisticsbody_span" :style="{color:statusColor}">{{logisticsValidate.status}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="8">
                                    <Form-item label="创建日期：">
                                        <span class="logisticsbody_span">{{logisticsValidate.createtime}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="8">
                                    <Form-item label="发货日期：">
                                        <span class="logisticsbody_span">{{logisticsValidate.shipdate}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="8">
                                    <Form-item label="提货单号：">
                                        <span class="logisticsbody_span">{{logisticsValidate.deliverynumber}}</span>
                                    </Form-item>
                                </i-col>
                            </Row>
                            <Row>
                                <i-col span="8">
                                    <Form-item label="揽件日期：">
                                        <span class="logisticsbody_span">{{logisticsValidate.pickuptime}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="8">
                                    <Form-item label="签收日期：">
                                        <span class="logisticsbody_span">{{logisticsValidate.signintime}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="8">
                                    <Form-item label="确认收货日期：">
                                        <span class="logisticsbody_span">{{logisticsValidate.confirmtime}}</span>
                                    </Form-item>
                                </i-col>
                            </Row>
                            <Row>
                                <i-col span="8">
                                    <Form-item label="操作时间：">
                                        <span class="logisticsbody_span">{{logisticsValidate.operatetime}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="8">
                                    <Form-item label="确认收货IP：">
                                        <span class="logisticsbody_span">{{logisticsValidate.confirmip}}</span>
                                    </Form-item>
                                </i-col>
                            </Row>
                            </div>
                            <h4>
                                <span class="logisticstitle">地址信息</span>
                            </h4>
                            <div class="logisticsbody">
                                <Row>
                                    <i-col span="8">
                                        <Form-item label="快递公司：">
                                            <span class="logisticsbody_span">{{logisticsValidate.expressName}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="国家：">
                                            <span class="logisticsbody_spanp">{{logisticsValidate.country}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="洲(省)：">
                                            <span class="logisticsbody_span">{{logisticsValidate.province}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="城市：">
                                            <span class="logisticsbody_span">{{logisticsValidate.city}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="邮政编码：">
                                            <span class="logisticsbody_span">{{logisticsValidate.zipcode}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="手机号码：">
                                            <span class="logisticsbody_span">{{logisticsValidate.mobilephone}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="联系人：">
                                            <span class="logisticsbody_span">{{logisticsValidate.contact}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="付款账号：">
                                            <span class="logisticsbody_span" >{{logisticsValidate.payerAccountNumber}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="账号所在地邮编：">
                                            <span class="logisticsbody_span">{{logisticsValidate.payerAccountNumberZipcode}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="发货方式：">
                                            <span class="logisticsbody_span">{{logisticsValidate.producttypename}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="关税支付账户：">
                                            <span class="logisticsbody_span">{{logisticsValidate.taxPayerAccountNumber}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="关税所在地邮编：">
                                            <span class="logisticsbody_span">{{logisticsValidate.taxPayerAccountZipcode}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="付款方式：">
                                            <span class="logisticsbody_span">{{logisticsValidate.paytypename}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="16">
                                        <Form-item label="公司：">
                                            <span class="logisticsbody_spans" >{{logisticsValidate.company}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8">
                                        <Form-item label="关税支付方式：">
                                            <span class="logisticsbody_span">{{logisticsValidate.txPyName}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="16">
                                        <Form-item label="详细地址：">
                                            <span class="logisticsbody_spana">{{logisticsValidate.address}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="24">
                                        <Form-item label="备注：">
                                            <span class="logisticsbody_spand" >{{logisticsValidate.remark}}</span>
                                        </Form-item>
                                    </i-col>
                                </Row>
                            </div>
                        </Form>
                        <h4>
                            <span class="logisticstitle">订单信息</span>
                        </h4>
                        <div class="logisticsbody">
                            <Table stripe border ref="logisticsDetailData" :data="logisticsDetailData" :columns="logisticsDetailColumns" ></Table>
                        </div>
                    </div>
                    <div slot="footer"></div>
                </Modal>
                <Modal class-name="popup"  v-model="shippingDetailModal"  @on-cancel="clearShipping('shippingValidate')" width="940" class="shipping" :mask-closable="false">
                    <p slot="header" style="color: #eeebeb;" v-drag>
                        <span>物流详情</span>
                    </p>
                    <div  class="shippingdetail">
                        <h4 class="clearfix">
                            <span class="fl shippingtitle">物品信息</span>
                            <span class="fr" style="font-weight: normal">
                                <span v-if="fh" style="color: #37b3b3; cursor: pointer;" @click="deliverGoods('shippingValidate')"><i class="iconfont">&#xe66c;</i> 发货&nbsp;&nbsp;</span>
                                <!--<span v-if="qxfh" style="color: #f76165; cursor: pointer;" @click="noDeliverGoods"><i class="iconfont">&#xe61a;</i> 取消发货&nbsp;&nbsp;</span>-->
                                <span v-if="beih" style="color: #37b3b3; cursor: pointer;" @click="showdianshangbeih"><i class="iconfont">&#xe62c;</i> 电商备货&nbsp;&nbsp;</span>
                                <span v-if="beih" style="color: #37b3b3; cursor: pointer;" @click="showkaimiaobeih"><i class="iconfont">&#xe62c;</i> 凯妙备货&nbsp;&nbsp;</span>
                                <span v-if="beih" style="color: #37b3b3; cursor: pointer;" @click="showruipubeih"><i class="iconfont">&#xe62c;</i> 瑞璞备货&nbsp;&nbsp;</span>
                                <span v-if="beih" style="color: #37b3b3; cursor: pointer;" @click="showwaimaobeih"><i class="iconfont">&#xe62c;</i> 外贸备货&nbsp;&nbsp;</span>
                                <span v-if="beih" style="color: #37b3b3; cursor: pointer;" @click="showbeih"><i class="iconfont">&#xe62c;</i> 备货&nbsp;&nbsp;</span>
                                <span v-if="boh" style="color: #f76165; cursor: pointer;" @click="showboh"><i class="iconfont">&#xe605;</i> 驳回</span>
                            </span>
                        </h4>
                        <Form ref="shippingValidate" :model="shippingValidate" :rules="ruleShippingValidate" label-position="left" :label-width="75">
                            <div class="datilbody">
                                <Row>
                                    <i-col span="6">
                                        <Form-item label="快递仓库：">
                                            <Select v-model="shippingValidate.storageid" placeholder=" ">
                                                <Option v-for="item in companyList" :value="item.id" :key="item">{{ item.company }}</Option>
                                            </Select>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="6">
                                        <Form-item label="快递公司：">
                                            <Select v-model="shippingValidate.expressCode" placeholder=" " disabled>
                                                <Option v-for="item in expressidList" :value="item.expressCode" :key="item">{{ item.expressName }}</Option>
                                            </Select>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="6">
                                        <Form-item label="快递方式：">
                                            <Select v-model="shippingValidate.producttype" placeholder=" " disabled>
                                                <Option v-for="item in producttypeList" :value="item.code" :key="item">{{ item.name }}</Option>
                                            </Select>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="6">
                                        <Form-item label="箱号选择：">
                                            <Select v-model="shippingValidate.boxid" placeholder=" ">
                                                <Option v-for="item in boxnameList" :value="item.id" :key="item">{{ item.boxname }}</Option>
                                            </Select>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="6" v-if="brand">
                                        <Form-item label="品牌：">
                                            <span>{{shippingValidate.brand}}</span>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="6">
                                        <Form-item label="包裹重量：" prop="weight">
                                            <Input v-model="shippingValidate.weight" @on-blur="getTotalPrice">
                                            <span slot="append">(KG)</span>
                                            </Input>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8" v-show="shippingValidate.expressCode == '103' || shippingValidate.expressCode == '104'">
                                        <span style="color: #F76165;">包裹重量请按箱号升序填写</span>
                                    </i-col>
                                </Row>
                                <Row>
                                    <i-col span="6">
                                        <Form-item label="支付方式：" prop="paytype">
                                            <Select v-model="shippingValidate.paytype" disabled>
                                                <Option v-for="item in paytypeList" :value="item.code" :key="item">{{ item.name }}</Option>
                                            </Select>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="6" v-show="tariffType">
                                        <Form-item label="关税类型：">
                                            <Select v-model="shippingValidate.taxPaymentType" disabled>
                                                <Option v-for="item in taxPaymentTypeList" :value="item.code" :key="item">{{ item.name }}</Option>
                                            </Select>
                                        </Form-item>
                                    </i-col>
                                    <!-- <i-col span="6" v-show="tariffquote">
                                         <Form-item label="关税报价：">
                                             <Input v-model="shippingValidate.tariffQuote" >
                                             <span slot="append">(USD)</span>
                                             </Input>
                                         </Form-item>
                                     </i-col>-->
                                </Row>
                                <Row v-show="paymentInf">
                                    <i-col span="6">
                                        <Form-item label="支付账号：" prop="payerAccountNumber">
                                            <Input v-model="shippingValidate.payerAccountNumber" ></Input>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="6">
                                        <Form-item label="支付邮编：" prop="payerAccountNumberZipcode">
                                            <Input v-model="shippingValidate.payerAccountNumberZipcode" ></Input>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="6">
                                        <Form-item label="运费国家：" prop="payerAccountNumberCity">
                                            <Input v-model="shippingValidate.payerAccountNumberCity" ></Input>
                                        </Form-item>
                                    </i-col>
                                </Row>
                                <Row v-show="tariffInf">
                                    <i-col span="6">
                                        <Form-item label="关税账号：" prop="taxPayerAccountNumber">
                                            <Input v-model="shippingValidate.taxPayerAccountNumber"></Input>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="6">
                                        <Form-item label="关税邮编：" prop="taxPayerAccountZipcode">
                                            <Input v-model="shippingValidate.taxPayerAccountZipcode" ></Input>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="6">
                                        <Form-item label="关税城市：" prop="taxPayerAccountNumberCity">
                                            <Input v-model="shippingValidate.taxPayerAccountNumberCity"></Input>
                                        </Form-item>
                                    </i-col>

                                </Row>
                                <Row>
                                    <i-col span="6" v-show="pricetab">
                                        <Form-item label="价格：" prop="price">
                                            <Input v-model="shippingValidate.price" ></Input>
                                        </Form-item>
                                    </i-col>
                                    <i-col span="8" v-show="shippingValidate.expressCode == '101' || shippingValidate.expressCode == '109'">
                                        <span style="color: #F76165;">(青岛市区请手动计算)</span>
                                    </i-col>
                                    <!--<i-col span="10" v-show="referenceno">
                                        <Form-item label="参考编码：" prop="referenceno">
                                            <Row>
                                                <i-col span="12"><Input v-model="shippingValidate.referenceno1"></Input></i-col>
                                                <i-col span="5"><Input v-model="shippingValidate.referenceno2"></Input></i-col>
                                                <i-col span="2">OF</i-col>
                                                <i-col span="5"><Input v-model="shippingValidate.referenceno3"></Input></i-col>
                                            </Row>
                                        </Form-item>
                                    </i-col>-->
                                </Row>
                            </div>
                            <h4 class="clearfix">
                                <span class="fl shippingtitle">物流信息</span>
                            </h4>
                            <Row class="datilbody nobutton">
                                <i-col span="6">
                                    <Form-item label="提货类型:" prop="picktype">
                                        <span>{{shippingValidate.picktype}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="6">
                                    <Form-item label="订单前缀:" prop="orderPrefix">
                                        <span>{{shippingValidate.orderPrefix}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="6">
                                    <Form-item label="手机号:" prop="mobilephone">
                                        <span>{{shippingValidate.mobilephone}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="6">
                                    <Form-item label="发货时间:" prop="shipdate">
                                        <span>{{shippingValidate.shipdate}}</span>
                                    </Form-item>
                                </i-col>
                            </Row>
                            <Row class="datilbody nobutton nobutton1">
                                <i-col span="12">
                                    <Form-item label="姓名:" prop="contact">
                                        <span>{{shippingValidate.contact}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="12">
                                    <Form-item label="公司名称:" >
                                        <span>{{shippingValidate.company}}</span>
                                    </Form-item>
                                </i-col>
                            </Row>
                            <h4 class="clearfix">
                                <span class="fl shippingtitle">收货信息</span>
                            </h4>
                            <Row class="datilbody nobutton">
                                <i-col span="6">
                                    <Form-item label="国家:" prop="country">
                                        <span>{{shippingValidate.country}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="6">
                                    <Form-item label="省份:" prop="province">
                                        <span>{{shippingValidate.province}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="6">
                                    <Form-item label="城市:" prop="city">
                                        <span>{{shippingValidate.city}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="6">
                                    <Form-item label="地区:" prop="area">
                                        <span>{{shippingValidate.area}}</span>
                                    </Form-item>
                                </i-col>
                            </Row>
                            <Row class="datilbody nobutton nobutton1">
                                <i-col span="24">
                                    <Form-item label="详细地址:" prop="address">
                                        <span>{{shippingValidate.address}}</span>
                                    </Form-item>
                                </i-col>
                            </Row>
                            <h4 class="clearfix">
                                <span class="fl shippingtitle">发货明细</span>
                                <span v-if="shippingValidate.username != 'TMW'" class="fr" style="font-weight: normal">
                                    <span style="color: #37b3b3; cursor: pointer;" @click="importdetailModal()"><i class="iconfont">&#xe61d;</i>导入箱号信息</span> |
                                    <span style="color: #37b3b3; cursor: pointer;" @click="exportdetailData()"><i class="iconfont">&#xe61d;</i>导出</span>
                                </span>
                                <span v-if="shippingValidate.username == 'TMW'" class="fr" style="font-weight: normal">
                                    <span style="color: #37b3b3; cursor: pointer;" @click="importdetailModal()"><i class="iconfont">&#xe61d;</i>导入箱号信息</span> |
                                    <span style="color: #37b3b3; cursor: pointer;" @click="exportdetailData()"><i class="iconfont">&#xe61d;</i>导出</span> |
                                    <span style="color: #37b3b3; cursor: pointer;" @click="exportfenxiangData()"><i class="iconfont">&#xe61d;</i>分箱导出</span> |
                                    <span style="color: #37b3b3; cursor: pointer;" @click="exportchaifenData()"><i class="iconfont">&#xe61d;</i>拆分导出</span> |
                                    <span style="color: #37b3b3; cursor: pointer;" @click="chaifenfenxiangData()"><i class="iconfont">&#xe61d;</i>拆分分箱</span>
                                </span>
                            </h4>
                            <div class="datilbody">
                                <div class="ivu-table-wrapper">
                                    <table   id="shippingdetail" ref="shippingdetailTable" class="shippingdetailtable" cellpadding="0" cellspacing="0" border="0" width="100%">
                                        <tr :modal="shippingdetailColumns">
                                            <th width="40px">{{shippingdetailColumns.index}}</th>
                                            <th width="120px">{{shippingdetailColumns.orderid}}</th>
                                            <th width="130px">{{shippingdetailColumns.customername}}</th>
                                            <th width="50px">{{shippingdetailColumns.boxno}}</th>
                                            <th width="55px">{{shippingdetailColumns.price}}</th>
                                            <th width="60px">{{shippingdetailColumns.categoriescount}}</th>
                                            <th width="75px">{{shippingdetailColumns.ordertype}}</th>
                                            <th width="90px">{{shippingdetailColumns.deliverydate}}</th>
                                            <th width="90px">{{shippingdetailColumns.instock}}</th>
                                            <th width="90px">{{shippingdetailColumns.id}}</th>
                                        </tr>
                                        <tr v-for="(item,index) in shippingdetailData" class="trhover">
                                            <td width="40px"><span>{{index+1}}</span></td>
                                            <td width="120px"><Tooltip placement="bottom-start" :content="item.orderid"><span>{{item.orderid}}</span></Tooltip></td>
                                            <td width="130px"><Tooltip placement="bottom-start" :content="item.customerName"><span>{{item.customerName}}</span></Tooltip></td>
                                            <td width="50px"><Tooltip placement="bottom-start" :content="item.boxno"><span><input  v-model="item.boxno" v-on:change="editBoxno(item)" type="text" value="" class="ivu-input"></span></Tooltip></td>
                                            <td width="55px"><Tooltip placement="bottom-start" :content="item.price"><span>{{item.price}}</span></Tooltip></td>
                                            <td width="60px"><Tooltip placement="bottom-start" :content="item.categoriesCount"><span>{{item.categoriesCount}}</span></Tooltip></td>
                                            <td width="75px"><Tooltip placement="bottom-start" :content="item.orderType"><span>{{item.orderType}}</span></Tooltip></td>
                                            <td width="90px"><Tooltip placement="bottom-start" :content="item.deliveryDate != null ? new Date(item.deliveryDate).format('yyyy-MM-dd') : ''"><span>{{item.deliveryDate != null ? new Date(item.deliveryDate).format('yyyy-MM-dd') : ""}}</span></Tooltip></td>
                                            <td width="90px"><Tooltip placement="bottom-start" :content="item.instock"><span>{{item.instock}}</span></Tooltip></td>
                                            <td width="90px" v-model="item.id"><span class="red" @click='deldetail(item.id)' style="cursor: pointer;">删除</span> | <span class="green" @click='editdetail(item)' style="cursor: pointer;">更改</span></td>
                                        </tr>
                                        <tr v-if="nodata" class="trhover">
                                            <td colspan='12'>暂无筛选结果</td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="formpage clearfix">
                                    <div class="fl">
                                        <span>共</span>
                                        <span class="num">{{shipdetailtotal}}</span>
                                        <span>条记录</span>
                                        <span>{{currentshipdetailPage}}/{{shipdetailpageTotal}}页</span>
                                    </div>
                                    <div class="fr">
                                        <Page :total="shipdetailtotal" :page-size="shipdetailpageSize"  :current="currentshipdetailPage"  @on-change="changeshipdetailPage"></Page>
                                    </div>
                                </div>
                            </div>
                            <h4 class="clearfix">
                                <span class="fl shippingtitle">备注信息</span>
                            </h4>
                            <div class="datilbody" prop="remark">
                                <div class="remark">{{shippingValidate.remark}}</div>
                            </div>
                        </Form>
                    </div>
                    <div slot="footer"></div>
                </Modal>
                <Modal class-name="popup" v-model="bohModal" width="300" class="adddepotbg" :mask-closable="false">
                    <p slot="header" style="color: #eeebeb;" v-drag >
                        <span>输入驳回原因</span>
                    </p>
                    <div class="adddepot boh" style="padding-top: 16px">
                        <Form ref="bohData"  :model="bohData" :rules="rulbohData" @on-cancel="clearboh('bohData')" label-position="left" :label-width="75">
                            <Form-item label="驳回原因：" prop="reason">
                                <Input v-model="bohData.reason" type="textarea" :rows="1"></Input>
                            </Form-item>
                        </Form>
                    </div>
                    <div slot="footer">
                        <div class="footer">
                            <Button  class="save" @click="submitboh('bohData')">提交</Button>
                            <Button class="clear" @click="clearboh('bohData')">取消</Button>
                        </div>
                    </div>
                </Modal>
                <Modal class-name="popup"   v-model="beihModal" width="300" class="adddepotbg" :mask-closable="false">
                    <p slot="header" style="color: #eeebeb;" v-drag >
                        <span>输入提货仓库</span>
                    </p>
                    <div  class="adddepot" style="padding-top: 16px">
                        <Form ref="beihData"  :model="beihData" @on-cancel="clearbeih('beihData')" label-position="left" :label-width="80">
                            <Form-item label="衬衣仓库：">
                                <Input v-model="beihData.shirt"></Input>
                            </Form-item>
                            <Form-item label="西服仓库：">
                                <Input v-model="beihData.suit"></Input>
                            </Form-item>
                        </Form>
                    </div>
                    <div slot="footer">
                        <div class="footer">
                            <Button  class="save" @click="submitbeih()">提交</Button>
                            <Button class="clear" @click="clearbeih('beihData')">取消</Button>
                        </div>
                    </div>
                </Modal>
                <Modal  class-name="popup"  class="editdetailbody" v-model="editdetailModal" @on-cancel="cleardetail('editdetailValidate')" :mask-closable="false" width="430" >
                    <p slot="header" style="color: #eeebeb;" v-drag>
                        <span>更改物流单号</span>
                    </p>
                    <div class="editdetailcon" style="height: 160px;">
                        <Form class="boxsearchform" ref="editdetailValidate" :model="editdetailValidate" :rules="rulesEditdetail" :label-width="75" label-position="left">
                            <Form-item label="订单号:" prop="orderId">
                                <Input :disabled="disabled"  v-model="editdetailValidate.orderId"></Input>
                            </Form-item>
                            <Form-item label="物流单号:" prop="code">
                                <Input v-model="editdetailValidate.code"></Input>
                            </Form-item>
                        </Form>
                    </div>
                    <div slot="footer">
                        <div class="footer">
                            <Button class="save" :loading="modal_loading" @click="editsaveDetail('editdetailValidate')">确认修改</Button>
                        </div>
                    </div>
                </Modal>
                <Modal  v-model="delModal" class-name="delect" width="250" @on-cancel="delCancel" :mask-closable="false">
                    <p slot="header" style="color: #eeebeb" v-drag>
                        <span>提示框</span>
                    </p>
                    <p class="delbody">
                        <i class="iconfont" style="color: #f76165;font-size: 16px;">&#xe615</i>&nbsp;&nbsp;确认删除？
                                </p>
                    <div slot="footer">
                        <div class="footer">
                            <Button  class="save" :loading="delLoading" @click="delOK">确认</Button>
                            <Button class="clear" @click="delCancel">取消</Button>
                        </div>
                    </div>
                </Modal>
                <Modal  v-model="qdprintmodal" class="qdprintmodal" width="250" @on-cancel="printCancel" :mask-closable="false">
                    <p slot="header" style="color: #eeebeb" v-drag>
                        <span>提示框</span>
                    </p>
                    <p class="delbody">
                        <i class="iconfont" style="color: #f76165;font-size: 16px;">&#xe615</i>&nbsp;&nbsp;确认打印该物流单？
                                </p>
                    <div slot="footer">
                        <div class="footer">
                            <Button  class="save" :loading="printLoading" @click="printOK">确认</Button>
                            <Button class="clear" @click="printCancel">取消</Button>
                        </div>
                    </div>
                </Modal>
                <Modal  v-model="importModal" class="qdprintmodal" width="250" :mask-closable="false">
                    <p slot="header" style="color: #eeebeb" v-drag>
                        <span>提示框</span>
                    </p>
                    <p class="delbody">
                        <Upload :action="importupload" :headers="uploadHeader" :format="['xls','xlsx']" :on-format-error="handleFormatErrorimport" :on-progress="uploadprogressimport" :on-success="uploadSuccessimport"  :on-error="uploadErrorimport" :default-file-list="fileList">
                            <Button class="tendbutton" type="ghost">导入Excel</Button>
                        </Upload>
                    </p>
                    <div slot="footer">
                    </div>
                </Modal>
                <Modal  class-name="popup" v-model="autopraghModal"  @on-cancel="clearAutopragh" width="710" class="autopragh" :mask-closable="false">
                    <p slot="header" style="color: #eeebeb;" v-drag>
                        <span>查看签名</span>
                    </p>
                    <div  class="autopraghdetail"  >
                        <img :src="customerSign" alt="" sty>
                    </div>
                    <div slot="footer">
                        <div class="footer">
                            <Button class="save" @click="resign">重新签名</Button>
                        </div>
                    </div>
                </Modal>
            </i-col>
            <i-col class="fr">
                <span>
                  <Button @click="edictStorehouse"><i class="iconfont cofont">&#xe668;</i> 仓库维护</Button>
                    <Modal  class-name="popup" class="depotbody" v-model="maindepot" :mask-closable="false" width="960">
                        <p slot="header" style="color: #eeebeb;" v-drag>
                            <span>仓库维护</span>
                        </p>
                        <div  class="exdepot" style="height: 415px;overflow-y: auto">
                            <Row>
                                <i-col>
                                    <Form class="depotsearchform" ref="depotSearchForm" :model="depotSearchForm" inline>
                                        <Form-item label="公司名称:" :label-width="65" style="width: 175px">
                                            <Input v-model="depotSearchForm.company" @on-enter="depotFormSearch"></Input>
                                        </Form-item>
                                        <Form-item label="快递公司:" :label-width="65" style="width: 175px">
                                            <Select v-model="depotSearchForm.expressid" placeholder=" ">
                                                <Option value="all">全部</Option>
                                                <Option v-for="item in expressidList" :value="item.expressCode" :key="item">{{ item.expressName }}</Option>
                                            </Select>
                                        </Form-item>
                                        <Form-item label="是否启用:" :label-width="65" style="width: 175px">
                                            <Select v-model="depotSearchForm.inuse" >
                                                <Option v-for="item in inuseList" :value="item.value" :key="item">{{ item.label }}</Option>
                                            </Select>
                                        </Form-item>
                                        <Form-item label="联系人:" :label-width="55" style="width: 165px">
                                            <Input v-model="depotSearchForm.contact" @on-enter="depotFormSearch"></Input>
                                        </Form-item>
                                        <Form-item  style="margin-right: 0px;float: right">
                                            <Button class="search" @click="depotFormSearch">搜索</Button>
                                            <Button style="margin-left: 5px;" @click="addExDepot">新增</Button>
                                        </Form-item>
                                    </Form>
                                     <Modal class-name="popup" v-model="addDepotModal" width="820" @on-cancel="cancelDepot('addExDepotValidate')" class="adddepotbg" :mask-closable="false" >
                                        <p slot="header" style="color: #eeebeb;" v-drag>
                                            <span v-if="addDepot">新增快递仓库信息</span>
                                            <span v-if="editDepot">编辑快递仓库信息</span>
                                        </p>
                                        <div  class="adddepot">
                                            <Form ref="addExDepotValidate"  :model="addExDepotValidate" :rules="ruledepotCustom"  label-position="left" :label-width="135">
                                                <Row>
                                                    <i-col span="12">
                                                        <Form-item label="公司名称:" prop="company">
                                                            <Input v-model="addExDepotValidate.company"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                         <Form-item label="快递公司:" prop="expressid">
                                                             <Select v-model="addExDepotValidate.expressid" placeholder="请选择快递公司">
                                                                 <Option v-for="item in expressidList2" :value="item.expressCode" :key="item">{{ item.expressName }}</Option>
                                                             </Select>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="联系人:" prop="contact">
                                                            <Input v-model="addExDepotValidate.contact"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="电话:" prop="tel">
                                                            <Input v-model="addExDepotValidate.tel"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="详细地址:" prop="address">
                                                            <Input v-model="addExDepotValidate.address"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="省份:" prop="province">
                                                            <Input v-model="addExDepotValidate.province"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="城市:" prop="city">
                                                            <Input v-model="addExDepotValidate.city"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="城市代码:" prop="citycode">
                                                            <Input v-model="addExDepotValidate.citycode"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="账号:" prop="username">
                                                            <Input v-model="addExDepotValidate.username"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="密码:" prop="password">
                                                            <Input v-model="addExDepotValidate.password" type="password"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="月结卡号" prop="cardno">
                                                            <Input v-model="addExDepotValidate.cardno"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="关税号:" prop="taxPayerAccountNumber">
                                                            <Input v-model="addExDepotValidate.taxPayerAccountNumber"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="支付账号:" prop="payerAccountNumber">
                                                            <Input v-model="addExDepotValidate.payerAccountNumber"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="关税账号所在地邮编:" prop="taxPayerAccountZipcode">
                                                            <Input v-model="addExDepotValidate.taxPayerAccountZipcode"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="关税账号所在地城市:" prop="taxPayerAccountNumberCity">
                                                            <Input v-model="addExDepotValidate.taxPayerAccountNumberCity"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="支付账号所在地邮编:" prop="payerAccountZipcode">
                                                            <Input v-model="addExDepotValidate.payerAccountZipcode"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col span="12">
                                                        <Form-item label="支付账号所在地城市:" prop="payerAccountNumberCity">
                                                            <Input v-model="addExDepotValidate.payerAccountNumberCity"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                </Row>
                                            </Form>
                                        </div>
                                        <div slot="footer">
                                            <div class="footer">
                                                <Button class="save" v-if="addDepot" :loading="modal_loading" @click="saveDepot('addExDepotValidate')">保存</Button>
                                                <Button class="clear" v-if="addDepot" @click="clearDepot('addExDepotValidate')">清空</Button>
                                                <Button class="save" v-if="editDepot" :loading="modal_loading" @click="editSaveDepot('addExDepotValidate')">确认修改</Button>
                                            </div>
                                        </div>
                                    </Modal>
                                </i-col>
                            </Row>
                            <!--<Loading v-if="depotspinShow"></Loading>-->
                            <Table v-if="depotShow" stripe border :columns="depotColumns" ref="depotData" :data="depotData"></Table>
                        </div>
                        <div class="formpage clearfix">
                            <div class="fl">
                                <span>共</span>
                                <span class="num">{{depottotal}}</span>
                                <span>条记录</span>
                                <span>{{currentdepotPage}}/{{depotpageTotal}}页</span>
                            </div>
                            <div class="fr">
                                <Page :total="depottotal" :current="currentdepotPage" @on-change="changedepotPage"></Page>
                            </div>
                        </div>
                        <div slot="footer"></div>
                    </Modal>
                </span>
                <span>
                  <Button @click="edictBoxDict"><i class="iconfont cofont">&#xe6cf;</i>  箱型维护</Button>
                    <Modal  class-name="popup" class="box" v-model="boxnumModal" :mask-closable="false" width="860">
                        <p slot="header" style="color: #eeebeb;" v-drag>
                            <span>箱型维护</span>
                        </p>
                        <div  class="exboxnum" style="height: 409px;overflow-y: auto">
                            <Row>
                                <i-col>
                                    <Form class="boxsearchform" ref="boxnumForm" :model="boxnumForm" inline>
                                        <Form-item label="箱子名称:" :label-width="65" style="width: 175px">
                                            <Input v-model="boxnumForm.boxname" @on-enter="boxnumSearch"></Input>
                                        </Form-item>
                                        <Form-item label="是否启用:" :label-width="65" style="width: 175px">
                                            <Select v-model="boxnumForm.inuse">
                                                <Option v-for="item in inuseList" :value="item.value" :key="item">{{ item.label }}</Option>
                                             </Select>
                                        </Form-item>
                                        <Form-item  style="margin-right: 0px;float: right">
                                            <Button class="search" @click="boxnumSearch">搜索</Button>
                                            <Button style="margin-left: 5px;" @click="addBoxNum">新增</Button>
                                        </Form-item>
                                    </Form>
                                    <Modal  class-name="popup" v-model="addboxnumModal"  @on-cancel="cancelBox('addBoxnumValidate')"  width="430" class="addboxbg" :mask-closable="false">
                                        <p slot="header" style="color: #eeebeb;" v-drag>
                                            <span v-if="addBox">新增箱型</span>
                                            <span v-if="editBox">箱型修改</span>
                                        </p>
                                        <div  class="addBox">
                                            <Form ref="addBoxnumValidate" :model="addBoxnumValidate" :rules="ruleBoxCustom" label-position="left" :label-width="45">
                                                <Row>
                                                    <i-col>
                                                        <Form-item label="箱名:" prop="boxname">
                                                            <Input v-model="addBoxnumValidate.boxname"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col>
                                                         <Form-item label="长度:" prop="len">
                                                             <Input v-model="addBoxnumValidate.len"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col>
                                                        <Form-item label="宽度:" prop="width">
                                                            <Input v-model="addBoxnumValidate.width"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col>
                                                        <Form-item label="高度:" prop="height">
                                                            <Input v-model="addBoxnumValidate.height"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col>
                                                         <Form-item label="重量:" prop="weight">
                                                             <Input v-model="addBoxnumValidate.weight"></Input>
                                                        </Form-item>
                                                    </i-col>
                                                    <i-col>
                                                        <Form-item label="状态:" prop="inuse">
                                                            <Radio-group v-model="addBoxnumValidate.inuse">
                                                                <Radio label="1">启用</Radio>
                                                                <Radio label="0">禁用</Radio>
                                                            </Radio-group>
                                                        </Form-item>
                                                    </i-col>
                                                </Row>
                                            </Form>
                                        </div>
                                        <div slot="footer">
                                            <div class="footer">
                                                 <Button class="save" v-if="addBox" :loading="modal_loading" @click="saveBox('addBoxnumValidate')">保存</Button>
                                                <Button class="clear" v-if="addBox" @click="clearBox('addBoxnumValidate')">清空</Button>
                                                <Button class="save" v-if="editBox" :loading="modal_loading" @click="editSaveBox('addBoxnumValidate')">确认修改</Button>
                                            </div>
                                        </div>
                                    </Modal>
                                </i-col>
                            </Row>
                            <!--<Loading v-if="boxnumspinShow"></Loading>-->
                            <Table v-if="boxnumShow" stripe border :columns="boxnumColumns" :data="boxnumData"></Table>
                        </div>
                        <div class="formpage clearfix">
                            <div class="fl">
                                <span>共</span>
                                <span class="num">{{boxnumtotal}}</span>
                                <span>条记录</span>
                                <span>{{currentboxnumPage}}/{{boxnumpageTotal}}页</span>
                            </div>
                            <div class="fr">
                                <Page :total="boxnumtotal" :current="currentboxnumPage" @on-change="changeboxnumPage"></Page>
                            </div>
                        </div>
                        <div slot="footer"></div>
                    </Modal>
                </span>
                <span>
                    <Button @click="tendwaybill"><i class="iconfont cofont">&#xe611;</i>  运单维护</Button>
                    <Modal  class-name="popup" class="tendwaybillbody" v-model="waybillModal" :mask-closable="false" width="275">
                        <p slot="header" style="color: #eeebeb;" v-drag>
                            <span>运单维护</span>
                        </p>
                        <div  class="tendwaybill" style="height: 170px;">
                            <Row>
                                <i-col>
                                    <label style="display:inline-block;width: 75px">导出模板：</label>
                                    <Button class="tendbutton" :loading="modal_loading" @click="exportWaybill">导出</Button>
                                </i-col>
                                <i-col>
                                    <Upload :action="actionupload" :headers="uploadHeader" :format="['xls','xlsx']" :on-format-error="handleFormatError" :on-progress="uploadprogress"  :on-success="uploadSuccess" :on-error="uploadError" :default-file-list="fileList">
                                        <label style="display:inline-block;width: 75px">导入Excel：</label>
                                        <Button class="tendbutton" type="ghost">上传文件</Button>
                                    </Upload>
                                </i-col>
                            </Row>
                            <span>备注:只能导入Excel表格，包含.xls和xlsx类型</span>
                        </div>
                        <div slot="footer"></div>
                    </Modal>
                </span>
                <span>
                    <Button @click="exportbody"><i class="iconfont cofont">&#xe61d;</i>  导出明细</Button>
                    <Modal  class-name="popup" class="exportbody" v-model="exportModal" @on-cancel="cancelExport('exportValidate')" :mask-closable="false" width="430">
                        <p slot="header" style="color: #eeebeb;" v-drag>
                            <span>导出明细</span>
                        </p>
                        <div  class="export" style="height: 220px;">
                            <Form class="exportform" ref="exportValidate" :model="exportValidate" :rules="ruleexportCustom" :label-width="75" label-position="left">
                                <Form-item label="快递公司:" prop="expressCode">
                                     <Select v-model="exportValidate.expressCode">
                                         <Option v-for="item in expressidList2" :value="item.expressCode" :key="item">{{ item.expressName }}</Option>
                                     </Select>
                                </Form-item>
                                <Form-item label="发货日期:" prop="shipdate">
                                    <Date-picker type="date" v-model="exportValidate.shipdate" placeholder="选择日期"></Date-picker>
                                </Form-item>
                            </Form>
                        </div>
                        <div slot="footer">
                            <div class="footer">
                                <Button class="save" :loading="modal_loading" @click="exportDetail('exportValidate')">导出</Button>
                            </div>
                        </div>
                    </Modal>
                </span>
            </i-col>
        </Row>
        <Modal  v-model="boxnoModal" class-name="delect" width="250" :loading="boxnoLoading" @on-cancel="boxnoCancel" :mask-closable="false">
            <p slot="header" style="color: #eeebeb" v-drag>
                <span>信息</span>
            </p>
            <p class="delbody">
                &nbsp;&nbsp;确认更新 <b style="color: #f76165">{{boxnoDetail.orderId}}</b> 的箱号?
                </p>
            <div slot="footer">
                <div class="footer">
                    <Button  class="save" :loading="boxnoLoading" @click="boxnoOK">确认</Button>
                    <Button class="clear" @click="boxnoCancel">取消</Button>
                </div>
            </div>
        </Modal>
        <Modal  v-model="upsModal" class-name="delect" width="250"  @on-cancel="upsCancel" :mask-closable="false">
            <p slot="header" style="color: #eeebeb" v-drag>
                <span>请点击运单号打印</span>
            </p>
            <p class="delbody">
                <span v-for="item in upsprintList" style="color: #37b3b3;cursor: pointer;" @click="printUPS(item.imageString)">{{item.pathString.substring(5,23)}}</span>
            </p>
            <div slot="footer">

            </div>
        </Modal>
        <div class="console-product-contcent noprint" id="contcentHeight" :style="{height:height +'px'}">
            <Form class="searchform" ref="shippingForm" :model="shippingForm" inline>
                <Form-item label="订单号:" :label-width="50" style="width: 175px">
                    <Input v-model="shippingForm.ordernos" @on-enter="shippingFormSearch"></Input>
                </Form-item>
                <Form-item label="运单号:" :label-width="50" style="width: 175px">
                    <Input v-model="shippingForm.waybillno" @on-enter="shippingFormSearch"></Input>
                </Form-item>
                <Form-item label="物流单号:" :label-width="65" style="width: 175px">
                    <Input v-model="shippingForm.code" @on-enter="shippingFormSearch"></Input>
                </Form-item>
                <Form-item label="门店号:" :label-width="50" style="width: 175px">
                    <Input v-model="shippingForm.ownedstore" @on-enter="shippingFormSearch"></Input>
                </Form-item>
                <Form-item label="电话:" :label-width="35" style="width: 160px">
                    <Input v-model="shippingForm.tel" @on-enter="shippingFormSearch"></Input>
                </Form-item>
                <Form-item label="发货日期:" :label-width="65" style="width: 265px">
                    <Date-picker type="daterange" v-model="shippingForm.shipdate" :options="shipDate0ptions" style="width: 200px;"></Date-picker>
                </Form-item>
                <Form-item label="状态:" :label-width="35" style="width: 120px">
                    <Select v-model="shippingForm.status">
                        <Option v-for="item in statusList" :value="item.value" :key="item">{{ item.label }}</Option>
                    </Select>
                </Form-item>
                <Form-item label="快递公司:" :label-width="65" style="width: 190px">
                    <Select v-model="shippingForm.expressCode">
                        <Option value="all">全部</Option>
                        <Option v-for="item in expressidList" :value="item.expressCode" :key="item">{{ item.expressName }}</Option>
                    </Select>
                </Form-item>
                <Form-item>
                    <Button class="search" @click="shippingFormSearch">搜索</Button>
                </Form-item>
            </Form>
            <Loading v-if="spinShow"></Loading>
            <Table v-if="tableShow"  stripe border :columns="shippingColumns" ref="shippingData" :data="shippingData"></Table>
        </div>
        <Row style="background-color: #ffffff;margin-top: 1px;">
            <Col>
            <div v-if="tableShow" class="tablepage clearfix">
                <div class="fl">
                    <span>共</span>
                    <span class="num">{{total}}</span>
                    <span>条记录</span>
                    <span>{{currentPage}}/{{pageTotal}}页</span>
                </div>
                <div class="fr">
                    <Page :total="total" :page-size="pageSize" :current="currentPage" placement="top" show-elevator show-sizer @on-change="changePage" @on-page-size-change="changeSize"></Page>
                </div>
            </div>
            </Col>
        </Row>
    </div>
</template>
<script>
    // 导入要用到的子组件
    import Loading from '../../components/loading'
    export default {
        data () {
            const validateNum = (rule, value, callback) => {
                if(value === "" || value === null){
                    callback();
                }else{
                    if (!/^\d+(\.\d{1,2})?$/.test(value)) {
                        callback(new Error('最多两位小数!'));
                    } else if (value.length > 5) {
                        callback(new Error('最多输入5位'));
                    }else {
                        callback();
                    }
                }
            };
            const validateWG = (rule, value, callback) => {
                if(value === "" || value === null){
                    callback("请输入包裹重量");
                }else if(!/^[0-9\.\,]*$/.test(value) ){
                    callback(new Error("请输入数字并以逗号隔开"))
                }else {
                    callback();
                }
            };
            return {
                disabled:false,
                modal_loading: false,
                total: 0,//总条数
                currentPage: 1,//当前页
                pageTotal: 1,//总页数
                pageSize: 10,//默认每页显示数量
                height: 1000,//表单高度
                spinShow: true,//加载层，默认显示
                tableShow: false,//表格层，默认隐藏
                depotspinShow:true,//仓库维护加载层，默认显示
                depotShow:false,//仓库维护表格层，默认显示
                boxnumspinShow:true,//箱号维护加载层，默认显示
                boxnumShow:false,//箱号维护表格层，默认显示
                autopraghModal:false,//签名弹窗
                statusColor : "#657180",//物流编号详情状态颜色
                notrack : true,//不能查询快递
                track : false,//查询快递
                paymentInf : false,//支付
                tariffInf : false,//关税
                brand : false,//品牌
                tariffType : false,//关税类型
                fedexPrompt : false,//包裹重量和关税报价请按箱号升序填写
                tariffquote : false,//关税报价
                pricetab : false,//价格字段 顺丰和韵达单独处理
                referenceno : false,//ups显示
                boxnoModal:false,
                boxnoLoading:false,
                loadMessage:"",
                uploadHeader:{Authorization : "Bearer "+localStorage.getItem('token')},
                actionupload:this.$store.state.url+'/shipping/uploap/xls',
                importupload:this.$store.state.url+'/box/batch',//批量上传物流箱号信息
                boxnoDetail:{
                    orderId :'',
                    boxNo :'',
                    shippingId:''
                },
                shippingForm: {//物流条件查询
                    ordernos: '',//订单号
                    waybillno: '',//运单号
                    code: '',//物流编号
                    ownedstore: '',//门店号
                    tel: '',//电话
                    status: ' ',//状态
                    expressCode: 'all',//快递公司
                    shipdate: [new Date().getTime() - 3600 * 1000 * 24 * 0,new Date()],//发货日期
                },
                shipDate0ptions: {
                    shortcuts: [
                        {
                            text: '最近一周',
                            value () {
                                const end = new Date();
                                const start = new Date();
                                start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                                return [start, end];
                            }
                        },
                        {
                            text: '最近一个月',
                            value () {
                                const end = new Date();
                                const start = new Date();
                                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                                return [start, end];
                            }
                        },
                        {
                            text: '最近三个月',
                            value () {
                                const end = new Date();
                                const start = new Date();
                                start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                                return [start, end];
                            }
                        }
                    ]
                },
                //是否启用
                inuseList:[
                    {
                        value: ' ',
                        label: '全部'
                    },
                    {
                        value: '0',
                        label: '禁用'
                    },
                    {
                        value: '1',
                        label: '启用'
                    }
                ],
                //快递公司列表
                expressidList: [],
                //快递公司2
                expressidList2: [],
                //状态列表
                statusList: [
                    {
                        value: ' ',
                        label: '全部'
                    },
                    {
                        value: '0',
                        label: '备货'
                    },
                    {
                        value: '1',
                        label: '发货'
                    },
                    {
                        value: '2',
                        label: '审核'
                    },
                    {
                        value: '3',
                        label: '已审核'
                    },
                    {
                        value: '6',
                        label: '已签收'
                    },
                    {
                        value: '7',
                        label: '已收货'
                    },
                    {
                        value: '8',
                        label: '待签收'
                    }
                ],
                //物流数据格式
                shippingColumns: [
                    {
                        width:'4%',
                        title: '序号',
                        type: 'index'
                    },
                    {
                        width:'14%',
                        title: '物流编号',
                        key: 'code',
                        align:'left',
                        sortable:true,
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.code,
                                    placement:"bottom-start"
                                }
                            }, [h('i',{class:'express-icon',style:{'background-position': params.row.expressCode == "101" ? '0px -0px' : params.row.expressCode == "102" ? '0px -112px' : params.row.expressCode == "103" ? '0px -96px' : params.row.expressCode == "104" ? '0px -32px' : params.row.expressCode == "105" ? '0px -64px' : params.row.expressCode == "106" ? '0px -128px' : params.row.expressCode == "107" ? '0px -16px' : params.row.expressCode == "108" ? '0px -48px' : params.row.expressCode == "109" ? '0px -80px' : ''}}),
                                h('span',
                                    {
                                        style: {cursor: 'pointer', color: '#36b4b3'},
                                        on: {
                                            click: () => {
                                                this.showLogistics(params.row.id)
                                            }
                                        }
                                    }, [
                                        h("span",params.row.code)
                                    ])
                            ]);
                        }
                    },
                    {
                        width:'8%',
                        title: '姓名',
                        key: 'contact',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.contact,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.contact)]);
                        }
                    },
                    {
                        width:'8%',
                        title: '用户',
                        key: 'username',
                        sortable:true,
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.username,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.username)]);
                        }
                    },
                    {
                        width:'13%',
                        title: '发货日期',
                        key: 'shipdate',
                        sortable:true,
                        render: (h, params) => {
                            const text = params.row.shipdate != null ? new Date(params.row.shipdate).format('yyyy-MM-dd') : "";
                            return h('Tooltip', {
                                props: {
                                    content: text,
                                    placement:"bottom-start",
                                }
                            }, [h('span', text)]);
                        }
                    },
                    {
                        width:'8%',
                        title: '快递公司',
                        key: 'expressCode',
                        sortable:true,
                        render: (h, params) => {
                            var text = params.row.expressCode == "101" ? '顺丰速递' : params.row.expressCode == "102" ? '联邦快递': params.row.expressCode == "103" ? 'DHL快递': params.row.expressCode == "104" ? 'UPS快递': params.row.expressCode == "105" ? '圆通快递' : params.row.expressCode == "106" ? '自提': params.row.expressCode == "107" ? 'TNT快递': params.row.expressCode == "108" ? '韵达快递' : params.row.expressCode == "109"? 'EMS快递':'';
                            return h('Tooltip', {
                                props: {
                                    content: text,
                                    placement:"bottom-start"
                                }
                            }, [h('span', text)]);
                        }
                    },
                    {
                        width:'13%',
                        title: '创建日期',
                        key: 'createtime',
                        sortable:true,
                        render: (h, params) => {
                            const text = params.row.createtime != null ? new Date(params.row.createtime).format('yyyy-MM-dd hh:mm:ss') : "";
                            return h('Tooltip', {
                                props: {
                                    content: text,
                                    placement:"bottom-start"
                                }
                            }, [h('span', text)]);
                        }
                    },
                    {
                        width:'8%',
                        title: '状态',
                        key: 'status',
                        sortable:true,
                        render: (h, params) => {
                            var text = params.row.status == "0" ? '备货' : params.row.status == "1" ? '发货': params.row.status == "2" ? '审核': params.row.status == "3" ? '已审核': params.row.status == "4" ? '处理中' : params.row.status == "5" ? '失败' : params.row.status == "6" ? '已签收' : params.row.status == "7" ? '已收货':'待签收';
                            return h('Tooltip', {
                                props: {
                                    content: text,
                                    placement:"bottom-start"
                                }
                            }, [h('span', text)]);
                        }
                    },
                    {
                        width:'24%',
                        title: '操作',
                        key: 'id',
                        render: (h, params) => {
                            return h('div', [
                                h('Button',
                                    {
                                        class:"green",
                                        on: {
                                            click: () => {
                                                this.exportInvoice(params.row)
                                            }
                                        }
                                    },
                                    [
                                        h('i', {
                                            class : 'iconfont icon-88'
                                        }),
                                        h("span",'报关单')
                                    ]),
                                h('Button',
                                    {
                                        class:"blue",
                                        on: {
                                            click: () => {
                                                this.showShipping(params.row.id)
                                            }
                                        }
                                    },
                                    [
                                        h('i', {
                                            class : 'iconfont icon-chakan'
                                        }),
                                        h("span",'查看')
                                    ]),
                                params.row.expressCode != "102" ? h('Button',
                                    {
                                        class:"orange",
                                        on: {
                                            click: () => {
                                                this.printShipping(params.row)
                                            }
                                        }
                                    },
                                    [
                                        h('i', {
                                            class : 'iconfont icon-dayin'
                                        }),
                                        h("span",'打印')
                                    ]):"",
                                params.row.expressCode == "106" && params.row.status == "7" ? h('Button',
                                    {
                                        class:"orange",
                                        on: {
                                            click: () => {
                                                this.seeAutograph(params.row.id)
                                            }
                                        }
                                    },
                                    [
                                        h('i', {
                                            class : 'iconfont icon-qianming'
                                        }),
                                        h("span",'查看签名')
                                    ]):""
                            ]);
                        }
                    }
                ],
                //物流数据
                shippingData: [],
                isShow:false,//显示物流详情
                fh:false,//发货
                qxfh:false,//取消发货
                beih:false,//备货
                boh:false,//驳回
                bohModal:false,
                beihModal:false,
                shippingDetailModal: false,//物流详情弹窗
                taxPaymentTypeList:[],//关税类型
                paytypeList:[],//支付方式
                producttypeList:[],//快递方式
                boxnameList:[],//箱号选择
                companyList:[],//快递仓库
                //驳回数据
                bohData:{
                    id:"",
                    reason:""
                },
                rulbohData:{
                    reason: [
                        {required: true, message: '请输入驳回原因', trigger: 'blur'}
                    ]
                },
                //备货数据
                beihData:{
                    id:"",
                    suit:"",
                    shirt:""
                },
                //物流详情数据
                shippingValidate:{
                    logisticid: '',//快递仓库
                    expressCode: '',//快递公司
                    producttype:'',//快递方式
                    boxid: '',//箱号选择
                    brand:'',//品牌
                    weight:'',//包裹重量
                    paytype:'',//支付方式
                    taxPaymentType:'',//关税类型
                    payerAccountNumber:'',//支付账号
                    payerAccountNumberZipcode:'',//支付邮编
                    payerAccountNumberCity:'',//运费国家
                    price:'',//价格
                    taxPayerAccountZipcode:'',//关税邮编
                    taxPayerAccountNumberCity:'',//关税城市
                    taxPayerAccountNumber:'',//关税账号
                    referenceno:'',//参考编码
                    picktype:'',//提货类型
                    orderPrefix:'',//订单前缀
                    company:'',//公司名称
                    shipdate: '',//发货日期
                    contact: '',//姓名
                    mobilephone: '',//手机
                    country: '',//国家
                    province: '',//省份
                    city: '',//城市
                    area:'',//地区
                    address: '',//地址
                    remark: '',//备注
                },
                shippingInforValidate:{
                    logisticid: '',//快递仓库
                    expressid: '',//快递公司
                    producttype:'',//快递方式
                    boxname: '',//箱号选择
                    brand:'',//品牌
                    username: '',//快递仓库
                    weight:'',//包裹重量
                    paytype:'',//支付方式
                    taxPaymentType:'',//关税类型
                    tariffQuote:'',//关税报价
                    payerAccountNumber:'',//支付账号
                    payerAccountNumberZipcode:'',//支付邮编
                    payerAccountNumberCity:'',//运费国家
                    price:'',//价格
                    taxPayerAccountZipcode:'',//关税邮编
                    taxPayerAccountNumberCity:'',//关税城市
                    taxPayerAccountNumber:'',//关税账号
                    referenceno:''//参考编码
                },
                //物流详情发货明细
                shippingdetailColumns:{
                    index:'序号',
                    orderid:'订单号',
                    customername:'客户名/品名',
                    boxno:'箱号',
                    price:'价格',
                    categoriescount:'数量',
                    ordertype:'类型',
                    deliverydate:'发货日期',
                    instock:'入库情况',
                    id:'操作',
                },
                shippingdetailData: [],//物流详情发货明细数据
                shipdetailtotal: 0,//发货明细表总条数
                currentshipdetailPage: 1,//当前页
                shipdetailpageTotal: 1,//发货明细总页数
                shipdetailpageSize: 500,//发货明细默认每页显示数量
                shipdetailId:'',
                editdetailValidate:{
                    orderId:'',//订单号
                    code:''//物流编号
                },
                ruleShippingValidate:{
                    company: [
                        {required: true,  trigger: 'blur'},
                        {type: "string", max: 100, message: '公司名称最大长度不能超过100位',trigger: 'blur'}
                    ],

                    username: [
                        {type: 'string', max: 50, message: '用户名最大长度不能超过50位', trigger: 'blur'}
                    ],
                    payerAccountNumber:[
                        { type: "string",max:50, message: '支付账号长度不能超过50位', trigger: 'blur' }
                    ],
                    payerAccountNumberZipcode:[
                        { type: "string",max:50, message: '支付邮编长度不能超过50位', trigger: 'blur' }
                    ],
                    payerAccountNumberCity:[
                        { type: "string",max:50, message: '运费国家长度不能超过50位', trigger: 'blur' }
                    ],
                    taxPayerAccountZipcode:[
                        { type: "string",max:50, message: '关税邮编长度不能超过50位', trigger: 'blur' }
                    ],
                    taxPayerAccountNumberCity:[
                        { type: "string",max:50, message: '关税城市长度不能超过50位', trigger: 'blur' }
                    ],
                    taxPayerAccountNumber:[
                        { type: "string",max:50, message: '关税账号长度不能超过50位', trigger: 'blur' }
                    ],
                    cardno:[
                        { type: "string",max:50, message: '月结卡号长度不能超过50位', trigger: 'blur' }
                     ],

                    price:[
                        { type: "string",max:20, message: '价格长度不能超过20位', trigger: 'blur' }
                    ],
                    weight:[
                        {type: "string", validator: validateWG, trigger: 'blur'},
                        /*{type: 'string', max: 5, message: '包裹重量不能大于5位', trigger: 'blur' }*/
                        ]
                },
                rulesEditdetail:{
                    code:[
                        { required: true, message: '请输入物流编号', trigger: 'blur' }
                    ]
                },
                delModal:false,
                delLoading:false,
                delId:'',
                exportValidate:{
                    expressCode:'101',//快递公司
                    shipdate:''//发货日期
                },
                ruleexportCustom:{//导出明细验证
                    expressCode: [
                        {required: true, message: '请选择快递公司', trigger: 'change'}
                    ],
                    shipdate: [
                        {required: true, type:'date', message: '请输入发货日期', trigger: 'change'}
                    ],
                    customer: [
                        {required: true, message: '请输入客户名', trigger: 'change'}
                    ]
                },
                maindepot: false,//仓库弹窗
                depottotal: 0,//仓库维护仓库维护总条数
                currentdepotPage: 1,//当前页
                depotpageTotal: 1,//仓库维护总页数
                depotpageSize: 10,//仓库维护默认每页显示数量
                //仓库维护数据格式
                depotColumns: [
                    {
                        title: '序号',
                        type: 'index',
                        width: 30
                    },
                    {
                        title: '公司名称',
                        key: 'company',
                        width: 180,
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.company,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.company)]);
                        }
                    },
                    {
                        title: '联系人',
                        key: 'contact',
                        width: 59,
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.contact,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.contact)]);
                        }
                    },
                    {
                        title: '电话',
                        key: 'tel',
                        width: 103,
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.tel,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.tel)]);
                        }
                    },
                    {
                        title: '省份',
                        key: 'province',
                        width: 88,
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.province,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.province)]);
                        }
                    },
                    {
                        title: '城市',
                        key: 'city',
                        width: 71,
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.city,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.city)]);
                        }
                    },
                    {
                        title: '账号',
                        key: 'username',
                        width: 123,
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.username,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.username)]);
                        }
                    },
                    {
                        title: '快递公司',
                        key: 'expressid',
                        width: 80,
                        render: (h, params) => {
                            var text = params.row.expressid == 101 ? '顺丰速递' : params.row.expressid == 102 ? '联邦快递': params.row.expressid == 103 ? 'DHL快递': params.row.expressid == 104 ? 'UPS快递': params.row.expressid == 106 ? '自提': params.row.expressid == 107 ? 'TNT快递': params.row.expressid == 109 ? 'EMS快递':'';
                            return h('Tooltip', {
                                props: {
                                    content: text,
                                    placement:"bottom-start"
                                }
                            }, [h('span', text)]);
                        }
                    },
                    {
                        width: 60,
                        title: '状态',
                        key: 'inuse',
                        render: (h, params) => {
                            return h('div', [
                                params.row.inuse == 0 ?
                                    h('Tooltip', {
                                        props: {
                                            content: '禁用',
                                            placement:"bottom-start"
                                        }
                                    }, [h('i',
                                        {
                                            class:'iconfont icon-suo',
                                            style:{
                                                cursor:'pointer',
                                                color: '#f76165'
                                            },
                                            on: {
                                                click: () => {
                                                    this.toggleDepotFav(params.row)
                                                }
                                            }
                                        })])
                                    :
                                    h('Tooltip', {
                                        props: {
                                            content: '启用',
                                            placement:"bottom-start"
                                        }
                                    }, [h('i',
                                        {
                                            class:'iconfont icon-suo1',
                                            style:{
                                                cursor:'pointer',
                                                color: '#37b3b3'
                                            },
                                            on: {
                                                click: () => {
                                                    this.toggleDepotFav(params.row)
                                                }
                                            }
                                        })])
                            ]);
                        }
                    },
                    {
                        width: 100,
                        title: '操作',
                        key: 'id',
                        render: (h, params) => {
                            return h('div', [
                                h('span',
                                    {
                                        style:{
                                            cursor:'pointer',
                                            color: '#37b3b3'
                                        },
                                        on: {
                                            click: () => {
                                                this.editExDepot(params.row.id)
                                            }
                                        }
                                    },'编辑')
                            ]);
                        }
                    }
                ],
                depotData: [],//仓库维护数据
                depotSearchForm: {//仓库查询条件
                    company: '',//快递仓库
                    contact: '',//联系人
                    inuse: ' ',//状态
                    expressid: 'all'//快递公司
                },
                addDepot: false,//新增仓库维护
                editDepot: false,//编辑仓库维护
                addExDepotValidate: {//仓库维护新增
                    id:'',
                    company: '',//快递仓库
                    contact: '',//联系人
                    tel: '',//电话
                    address: '',//地址
                    province: '',//省份
                    city: '',//城市
                    citycode: '',//城市代码
                    username: '',//账号
                    cardno: '',//月结卡号
                    taxPayerAccountNumber: '',//关税号
                    taxPayerAccountZipcode: '',//关税账号所在地邮编
                    taxPayerAccountNumberCity: '',//关税账号所在地城市
                    payerAccountNumber: '',//支付账号
                    payerAccountZipcode: '',//支付账号所在地邮编
                    payerAccountNumberCity: '',//支付账号所在地城市
                    password: ''//密码
                },
                ruledepotCustom: {//新增仓库验证
                    payerAccountZipcode:[
                { type: "string",max:50, message: '支付账号所在地邮编长度不能超过50位', trigger: 'blur' }
            ],
                    payerAccountNumberCity:[
                        { type: "string",max:50, message: '支付账号所在城市长度不能超过50位', trigger: 'blur' }
                    ],
                    company: [
                        {required: true, message: '请输入公司名称', trigger: 'blur'},
                        {type: "string", max: 100, message: '公司名称最大长度不能超过100位',trigger: 'blur'}
                    ],
                    payerAccountNumber:[
                        { type: "string",max:50, message: '支付账号长度不能超过50位', trigger: 'blur' }
                    ],
                    payerAccountNumberZipcode:[
                        { type: "string",max:50, message: '支付邮编长度不能超过50位', trigger: 'blur' }
                    ],
                    taxPayerAccountZipcode:[
                        { type: "string",max:50, message: '关税邮编长度不能超过50位', trigger: 'blur' }
                    ],
                    taxPayerAccountNumberCity:[
                        { type: "string",max:50, message: '关税城市长度不能超过50位', trigger: 'blur' }
                    ],
                    taxPayerAccountNumber:[
                        { type: "string",max:50, message: '关税账号长度不能超过50位', trigger: 'blur' }
                    ],
                    cardno:[
                        { type: "string",max:50, message: '月结卡号长度不能超过50位', trigger: 'blur' }
                    ],
                    payerAccountNumber:[

                        { type: "string",max:50, message: '支付账号长度不能超过50位', trigger: 'blur' }
                    ],
                    payerAccountNumberZipcode:[
                        { type: "string",max:50, message: '支付邮编长度不能超过50位', trigger: 'blur' }
                    ],
                    expressid: [
                        {required: true, message: '请选择快递公司', trigger: 'change'}
                    ],
                    contact: [
                        {required: true, message: '请输入联系人', trigger: 'blur'},
                        {type: "string", max: 100, message: '联系人最大长度不能超过100位',trigger: 'blur'}
                    ],
                    tel: [
                        {required: true, message: '请输入电话', trigger: 'blur'},
                        {type: "string", max: 50, message: '电话最大长度不能超过50位',trigger: 'blur'}
                    ],
                    address: [
                        {required: true, message: '请输入详细地址', trigger: 'blur'},
                        {type: "string", max: 200, message: '详细地址最大长度不能超过200位',trigger: 'blur'}
                    ],
                    province: [
                        {required: true, message: '请输入省份', trigger: 'blur'},
                        {type: "string", max: 50, message: '省份最大长度不能超过50位',trigger: 'blur'}
                    ],
                    city: [
                        {required: true, message: '请输入城市', trigger: 'blur'},
                        {type: "string", max: 50, message: '城市最大长度不能超过50位',trigger: 'blur'}
                    ],
                    citycode: [
                        {required: true, message: '请输入城市代码', trigger: 'blur'},
                        {type: "string", max: 50, message: '城市代码最大长度不能超过50位',trigger: 'blur'}
                    ],
                    username: [
                        {required: true, message: '请输入账号', trigger: 'blur'},
                        {type: "string", max: 50, message: '账号最大长度不能超过50位',trigger: 'blur'}
                    ],
                    password: [
                        {required: true, message: '请输入密码', trigger: 'blur'},
                        {type: "string", max: 50, message: '密码最大长度不能超过50位',trigger: 'blur'}
                    ]
                },
                addDepotModal: false,//新增仓库
                waybillModal:false,//运单维护窗口
                addBox: false,//新增箱型维护
                editBox: true,//编辑箱型维护
                boxnumModal: false,//箱号弹窗
                addboxnumModal: false,//新增箱号
                ruleBoxCustom: {//新增箱号验证
                    boxname: [
                        {required: true, message: '请输入箱名', trigger: 'blur'},
                        {type: "string", max: 100, message: '箱名最大长度不能超过100位',trigger: 'blur'}
                    ],
                    len: [
                        {type: "string", validator: validateNum, trigger: 'blur'}
                    ],
                    width: [
                        {type: "string", validator: validateNum, trigger: 'blur'}
                    ],
                    height: [
                        {type: "string", validator: validateNum, trigger: 'blur'}
                    ],
                    weight: [
                        {type: "string", validator: validateNum, trigger: 'blur'}
                    ]
                },
                boxnumForm: {//箱型维护条件查询
                    boxname: '',
                    inuse: ' '
                },
                boxnumtotal: 0,//箱型维护仓库维护总条数
                currentboxnumPage: 1,//箱型维护当前页
                boxnumpageTotal: 1,//箱型维护总页数
                boxnumpageSize: 10,//箱型维护默认每页显示数量
                boxnumData: [],//箱型维护数据
                //箱号数据格式
                boxnumColumns: [
                    {
                        title: '序号',
                        type: 'index',
                        width: 40
                    },
                    {
                        title: '名称',
                        key: 'boxname',
                        width: 140,
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.boxname,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.boxname)]);
                        }
                    },
                    {
                        title: '长度',
                        key: 'len',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.len,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.len)]);
                        }
                    },
                    {
                        title: '宽度',
                        key: 'width',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.width,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.width)]);
                        }
                    },
                    {
                        title: '高度',
                        key: 'height',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.height,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.height)]);
                        }
                    },
                    {
                        title: '重量',
                        key: 'weight',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.weight,
                                    placement:"bottom-start"
                                }
                            }, [h('span', params.row.weight)]);
                        }
                    },
                    {
                        title: '状态',
                        key: 'inuse',
                        width: 100,
                        render: (h, params) => {
                            return h('div', [
                                params.row.inuse == 0 ?
                                    h('Tooltip', {
                                        props: {
                                            content: '禁用',
                                            placement:"bottom-start"
                                        }
                                    }, [h('i',
                                        {
                                            class:'iconfont icon-suo',
                                            style:{
                                                cursor:'pointer',
                                                color: '#f76165'
                                            },
                                            on: {
                                                click: () => {
                                                    this.toggleBoxFav(params.row)
                                                }
                                            }
                                        })])
                                    :
                                    h('Tooltip', {
                                        props: {
                                            content: '启用',
                                            placement:"bottom-start"
                                        }
                                    }, [h('i',
                                        {
                                            class:'iconfont icon-suo1',
                                            style:{
                                                cursor:'pointer',
                                                color: '#37b3b3'
                                            },
                                            on: {
                                                click: () => {
                                                    this.toggleBoxFav(params.row)
                                                }
                                            }
                                        })])
                            ]);
                        }
                    },
                    {
                        title: '操作',
                        key: 'id',
                        render: (h, params) => {
                            return h('div', [
                                h('span',
                                    {
                                        style:{
                                            cursor:'pointer',
                                            color: '#37b3b3'
                                        },
                                        on: {
                                            click: () => {
                                                this.editBoxnum(params.row.id)
                                            }
                                        }
                                    },'编辑'),
                            ]);
                        }
                    }
                ],
                addBoxnumValidate: {//箱型维护新增
                    id:'',
                    boxname: '',
                    len: '',
                    width: '',
                    height: '',
                    weight: '',
                    inuse: '1'
                },
                exportModal:false,//导出明细弹窗
                editdetailModal:false,//更改发货明细弹窗
                logisticsModal:false,//物流编码详情弹窗
                logisticsValidate:{//物流编码详情数据
                    code:'',//物流单号
                    waybillno:'',//运单号
                    status:'',//状态
                    createtime:'',//创建日期
                    shipdate:'',//发货日期
                    deliverynumber:'',//提货单号
                    expressCode:'',//快递公司
                    country:'',//国家
                    province:'',//洲(省)
                    city:'',//城市
                    zipcode:'',//邮政编码
                    mobilephone:'',//手机号码
                    contact:'',//联系人
                    payerAccountNumber:'',//付款账号
                    payerAccountNumberZipcode:'',//财号所在地邮编
                    producttype:'',//发货方式
                    taxPayerAccountNumber:'',//关税支付账户
                    taxPayerAccountZipcode:'',//关税所在地邮编
                    paytypename:'',//付款方式
                    address:'',//详细地址
                    txPyName:'',//关税支付方式
                    company:'',//公司
                    remark:'',//备注
                    pickuptime:'',//揽件日期
                    signintime:'',//签收日期
                    confirmtime:'',//确认收货日期
                    operatetime:'',//操作时间
                    confirmip:''//确认收货IP
                },
                logisticsDetailData:[],
                logisticsDetailColumns:[
                    {
                        width:60,
                        title: '序号',
                        type: 'index'
                    },
                    {
                        width:120,
                        title: '订单名',
                        key: 'orderid',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.orderid
                                }
                            }, [h('span', params.row.orderid)]);
                        }
                    },
                    {
                        width:120,
                        title: '客户名/品名',
                        key: 'customerName',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.customerName
                                }
                            }, [h('span', params.row.customerName)]);
                        }
                    },
                    {
                        width:60,
                        title: '箱号',
                        key: 'boxno',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.boxno
                                }
                            }, [h('span', params.row.boxno)]);
                        }
                    },
                    {
                        width:60,
                        title: '价格',
                        key: 'price',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.price
                                }
                            }, [h('span', params.row.price)]);
                        }
                    },
                    {
                        width:60,
                        title: '数量',
                        key: 'categoriesCount',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.categoriesCount
                                }
                            }, [h('span', params.row.categoriesCount)]);
                        }
                    },
                    {
                        width:80,
                        title: '类型',
                        key: 'orderType',
                        render: (h, params) => {
                            return h('Tooltip', {
                                props: {
                                    content: params.row.orderType
                                }
                            }, [h('span', params.row.orderType)]);
                        }
                    },
                    {
                        width:120,
                        title: '发货日期',
                        key: 'deliveryDate',
                        render: (h, params) => {
                            const text = params.row.deliveryDate != null ? new Date(params.row.deliveryDate).format('yyyy-MM-dd') : "";
                            return h('Tooltip', {
                                props: {
                                    content: text
                                }
                            }, [h('span', text)]);
                        }
                    }
                ],
                logDetailModal:false,
                logDetailData:'',
                customerSign:'',
                resignData:'',
                signatureId:'',
                upsModal:false,
                upsprintList:[],
                qdprintmodal:false,
                printLoading:false,
                qdprintdata:{},
                importModal:false,
                fileList:[],
                nodata:false
            }
        },
        //所需子组件
        components: {
            Loading
        },
        created:function(){
            var width = window.innerWidth;
            if(width >1600){
                this.height=window.innerHeight-200;
            }else if(width > 1440 && width <=1600){
                this.height=window.innerHeight-180;
            }else if(width > 1366 && width <=1440){
                this.height=window.innerHeight-172;
            }else if(width > 1280 && width <=1366){
                this.height=window.innerHeight-166;
            }else if(width > 1024 && width <=1280){
                this.height=window.innerHeight-162;
            }else{
                this.height=window.innerHeight-151;
            }
            if(window.innerWidth > 1600){
                this.pageSize=20;
            }
            this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);

            //快递公司列表
            axios.get('/expresses/').then(res => {
                this.expressidList2=res.data;
            }).catch(err =>{
            });
            axios.get('/expresses',{params: {pageIndex : 1,pageSize : 100}}).then(res => {
                this.expressidList=res.data.data;
            }).catch(err =>{
            });
        },
        mounted() {
            $(".logisticsdetail").scroll(function() {
                if(sessionStorage.getItem("logisticsdetailScrollTop") == "YES"){
                    $('.logisticsdetail').animate({ scrollTop: 0 }, 1);
                    sessionStorage.setItem("logisticsdetailScrollTop","NO");
                };
            });
            $(".shippingdetail").scroll(function() {
                if(sessionStorage.getItem("shippingdetailScrollTop") == "YES"){
                    $('.shippingdetail').animate({ scrollTop: 0 }, 1);
                    sessionStorage.setItem("shippingdetailScrollTop","NO");
                };
            });
        },
        methods: {
            //查询物流数据，条件，当前页，每页显示多少条
            shippingTableData (formData,currentPage,pageSize) {
                this.spinShow=true;
                this.tableShow = false;
                var code = formData.code;//物流单号
                var waybillno = formData.waybillno;//运单号
                var ordernos = formData.ordernos;//订单号
                var ownedStore = formData.ownedstore;//门店号
                var tel = formData.tel;//电话
                var status = formData.status.replace(/(^\s+)|(\s+$)/g, "");//状态
                var expressCode = "";//物流公司
                if(formData.expressCode == "all"){
                    expressCode = "";
                }else{
                    expressCode = formData.expressCode;
                }
                var fromDate = "";//发货开始日期
                var toDate = "";//发货结束日期
                if(formData.shipdate.length != 0 && formData.shipdate[0] != null && formData.shipdate[1] != null ){
                    var fromDateTime = (new Date(formData.shipdate[0])).getTime();
                    fromDate = new Date(fromDateTime).format("yyyy-MM-dd");
                    var toDateTime = (new Date(formData.shipdate[1])).getTime();
                    toDate = new Date(toDateTime).format("yyyy-MM-dd");
                }
                let data = {
                    params: {
                        pageIndex : currentPage,
                        pageSize : pageSize,
                        code : code,
                        waybillno : waybillno,
                        ordernos : ordernos,
                        ownedStore : ownedStore,
                        tel : tel,
                        status : status,
                        expressCode : expressCode,
                        fromDate : fromDate,
                        toDate : toDate
                    }
                };
                axios.get('/shippings',data).then(res => {
                    this.total=res.data.total;
                    this.pageTotal=Math.ceil(res.data.total / pageSize);
                    this.shippingData = res.data.data;
                    this.spinShow=false;
                    this.tableShow = true;
                }).catch(err =>{
                })
            },
            //条件查询
            shippingFormSearch () {
                this.currentPage = 1;
                this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
            },
            //改变页数
            changePage: function (page) {
                this.currentPage=page;
                this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
            },
            //改变每页显示多少条
            changeSize: function (pageSize) {
                this.currentPage=1;
                this.pageSize = pageSize;
                this.pageTotal=Math.ceil(this.total / this.pageSize);
                this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
            },
            //清空物流查看数据
            clearShipping(name){
                this.fh = false;
                this.qxfh = false;
                this.beih = false;
                this.boh = false;
                this.paymentInf = false;//支付
                this.tariffInf = false;//关税
                this.brand = false;//品牌
                this.tariffType = false;//关税类型
                this.fedexPrompt = false;//包裹重量和关税报价请按箱号升序填写
                this.tariffquote = false;//关税报价
                this.pricetab = false;//价格字段 顺丰和韵达单独处理
                this.referenceno = false;//ups显示
                this.shippingdetailData = [];
                this.$refs[name].resetFields();
                sessionStorage.setItem("shippingdetailScrollTop","YES");
            },
            //驳回弹窗
            showboh(){
                this.bohData = {
                    id:this.shippingValidate.id, reason:""
                };
                this.bohModal = true;
            },
            //驳回弹窗取消
            clearboh(name){
                this.$refs[name].resetFields();
                this.bohModal = false;
            },
            //驳回
            submitboh(name){
                this.$refs[name].validate((valid) => {
                    if (valid) {
                        axios.delete('/shipping/'+this.bohData.id, {params:{reason:this.bohData.reason}}).then(res => {
                            this.bohModal = false;
                            this.shippingDetailModal = false;
                            this.$Message.success('驳回成功');
                            this.$refs[name].resetFields();
                            this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
                        }).catch(err =>{
                            this.$Message.error({content: err,duration: 0,closable:true});
                        });
                    }
                });
            },
            //备货弹窗
            showbeih(){
                this.beihData = {id:this.shippingValidate.id, shirt:"",suit:""};
                this.beihModal = true;
            },
            showdianshangbeih(){
                this.beihData = {id:this.shippingValidate.id, shirt:"2047",suit:"2047"};
                this.beihModal = true;
            },
            showkaimiaobeih(){
                this.beihData = {id:this.shippingValidate.id, shirt:"2030",suit:"2030"};
                this.beihModal = true;
            },
            showruipubeih(){
                this.beihData = {id:this.shippingValidate.id, shirt:"2040",suit:"2040"};
                this.beihModal = true;
            },
            showwaimaobeih(){
                this.beihData = {id:this.shippingValidate.id, shirt:"2035",suit:"2034"};
                this.beihModal = true;
            },
            //备货弹窗取消
            clearbeih(){
                this.beihData = {id:"", shirt:"",suit:""};
                this.beihModal = false;
            },
            //备货
            submitbeih(){
                var qs = require("qs");
                this.$Message.loading({
                    content: '正在备货，请稍后......',
                    duration: 0
                });
                axios.put('/shipping/stock', {id:this.beihData.id,shirt:this.beihData.shirt,suit:this.beihData.suit}).then(res => {
                    this.$Message.destroy();
                    this.beihModal = false;
                    this.shippingDetailModal = false;
                    this.$Message.success('备货成功');
                    this.beihData = {id:"", shirt:"",suit:""};
                    this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
                }).catch(err =>{
                    this.$Message.error({content: err,duration: 0,closable:true});
                    this.$Message.destroy();
                });
            },
            //发货
            deliverGoods(name) {
                this.$refs[name].validate((valid) => {
                    if (valid) {
                        if(this.shippingdetailData.length == 0){
                            this.$Message.error("发货明细没有数据，不能发货");
                        }else{
                            //重量必填，如果是第三方支付 账号必填
                            if(this.shippingValidate.weight == ""){
                                this.$Message.error("包裹重量不可为空");
                            }else if("106"!=this.shippingValidate.expressCode){
                                if("103" == this.shippingValidate.expressCode){//DHL
                                    if(this.shippingValidate.paytype == "T"){//第三方支付
                                        if(this.shippingValidate.payerAccountNumber == ""){
                                            this.$Message.error("支付账号必填");
                                        }else{
                                            this.$Message.loading({
                                                content: '正在发货，请稍后......',
                                                duration: 0
                                            });
                                            axios.post('/delivery',this.shippingValidate).then(res => {
                                                this.$Message.destroy();
                                                this.$Message.success("发货成功");
                                                this.shippingDetailModal = false;
                                                this.qdprintdata = {id:this.shippingValidate.id,expresscode:this.shippingValidate.expressCode};
                                                this.qdprintmodal = true;
                                                this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
                                            }).catch(err =>{
                                                this.$Message.destroy();
                                            });
                                        }
                                    }else if(this.shippingValidate.taxPaymentType == "T"){
                                        if(this.shippingValidate.taxPayerAccountNumber == ""){
                                            this.$Message.error("关税账号必填");
                                        }else{
                                            this.$Message.loading({
                                                content: '正在发货，请稍后......',
                                                duration: 0
                                            });
                                            axios.post('/delivery',this.shippingValidate).then(res => {
                                                this.$Message.destroy();
                                                this.$Message.success("发货成功");
                                                this.shippingDetailModal = false;
                                                this.qdprintdata = {id:this.shippingValidate.id,expresscode:this.shippingValidate.expressCode};
                                                this.qdprintmodal = true;
                                                this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
                                            }).catch(err =>{
                                                this.$Message.destroy();
                                            });
                                        }
                                    }else{
                                        this.$Message.loading({
                                            content: '正在发货，请稍后......',
                                            duration: 0
                                        });
                                        axios.post('/delivery',this.shippingValidate).then(res => {
                                            this.$Message.destroy();
                                            this.$Message.success("发货成功");
                                            this.shippingDetailModal = false;
                                            this.qdprintdata = {id:this.shippingValidate.id,expresscode:this.shippingValidate.expressCode};
                                            this.qdprintmodal = true;
                                            this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
                                        }).catch(err =>{
                                            this.$Message.destroy();
                                        });
                                    }
                                }else{
                                    if(this.shippingValidate.paytype == "3" && this.shippingValidate.payerAccountNumber == ""){//第三方支付
                                        this.$Message.error("支付账号必填");
                                    }else if(this.shippingValidate.taxPaymentType == "3" && this.shippingValidate.taxPayerAccountNumber == "" && "101" !=  this.shippingValidate.expressCode && "106" !=  this.shippingValidate.expressCode && "109" !=  this.shippingValidate.expressCode){
                                        this.$Message.error("关税账号必填");
                                    }else if(this.shippingValidate.paytype == "3" && this.shippingValidate.payerAccountNumberCity == "" && "104" ==  this.shippingValidate.expressCode){
                                        this.$Message.error("运费国家必填");
                                    }else if(this.shippingValidate.paytype == "3" && this.shippingValidate.taxPayerAccountNumberCity == "" && "104" ==  this.shippingValidate.expressCode){
                                        this.$Message.error("关税城市必填");
                                    }else{
                                        this.$Message.loading({
                                            content: '正在发货，请稍后......',
                                            duration: 0
                                        });
                                        axios.post('/delivery',this.shippingValidate).then(res => {
                                            this.$Message.destroy();
                                            this.$Message.success("发货成功");
                                            this.shippingDetailModal = false;
                                            this.qdprintdata = {id:this.shippingValidate.id,expresscode:this.shippingValidate.expressCode};
                                            if("102" == this.shippingValidate.expressCode){//联邦发货
                                                this.qdprintmodal = false;
                                            }else{
                                                this.qdprintmodal = true;
                                            }
                                            this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
                                        }).catch(err =>{
                                            this.$Message.destroy();
                                        });
                                    }
                                }
                            }else {//自提可以发货
                                this.$Message.loading({
                                    content: '正在发货，请稍后......',
                                    duration: 0
                                });
                                axios.post('/delivery',this.shippingValidate).then(res => {
                                    this.$Message.destroy();
                                    this.$Message.success("发货成功");
                                    this.shippingDetailModal = false;
                                    this.qdprintdata = {id:this.shippingValidate.id,expresscode:this.shippingValidate.expressCode};
                                    this.qdprintmodal = false;
                                    this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
                                }).catch(err =>{
                                    this.$Message.destroy();
                                });
                            }
                        }
                    }
                });
            },
            /*//取消发货
            noDeliverGoods(){
                axios.delete('/delivery/'+ this.shippingValidate.id).then(res => {
                    this.$Message.success("取消发货成功");
                    this.shippingDetailModal = false;
                    this.$refs[name].resetFields();
                    this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
                }).catch(err =>{
                    this.$Message.error(err);
                });
            },*/
            //根据ID查看物流详情
            showShipping (code) {
                this.$Message.loading({
                    content: '正在加载数据，请稍后......',
                    duration: 0
                });
                axios.get('/shipping/'+code).then(res => {
                    this.shippingValidate = res.data;
                    if(this.shippingValidate.price != null){
                        this.shippingValidate.price = this.shippingValidate.price.toString();
                    }
                    //快递仓库
                    axios.get('/storage/code/'+res.data.expressCode).then(res => {
                        this.companyList=res.data;
                        if(this.shippingValidate.storageid == null){
                            this.shippingValidate.storageid = res.data[0].id
                        }
                        //
                    }).catch(err =>{
                    });
                    //箱号选择
                    axios.get('/boxs/all').then(res => {
                        this.boxnameList=res.data;
                        if(this.shippingValidate.boxid == null){
                            this.shippingValidate.boxid = res.data[0].id
                        }
                        //this.shippingValidate.boxid = res.data[0].id;
                    }).catch(err =>{
                    });
                    //支付方式和关税类型
                    axios.get('/logisticsDict',{params: {expressCode : res.data.expressCode,categoryid:2}}).then(res => {
                        this.paytypeList=res.data;
                        this.taxPaymentTypeList=res.data;
                    }).catch(err =>{
                    });
                    //快递方式
                    axios.get('/logisticsDict',{params: {expressCode : res.data.expressCode,categoryid:3}}).then(res => {
                        this.producttypeList=res.data;
                    }).catch(err =>{
                    });
                    //101顺丰，102联邦，103DHL，104UPS，106自提，107TNT，109EMS
                    if("101" == res.data.expressCode || "106" == res.data.expressCode || "109" == res.data.expressCode){
                        this.tariffInf = true;//关税
                        this.tariffType = true;//关税类型
                        this.fedexPrompt = false;//包裹重量和关税报价请按箱号升序填写
                        this.tariffquote = true;//关税报价
                        this.referenceno = false;//ups显示
                    }else if("104"==res.data.expressCode){
                        this.referenceno = true;//ups显示
                        this.tariffType = true;//关税类型
                    }else{
                        this.tariffInf = true;
                        this.tariffType = true;
                        this.fedexPrompt = false;
                        this.referenceno = false;
                        if("102" == res.data.expressCode){
                            this.fedexPrompt = true;
                            //this.tariffquote = true;
                        }
                    }
                    //判断支付关税类型
                    //判断是那个物流
                    if("103" == res.data.expressCode){//DHL
                        if(res.data.paytype != "S"){
                            this.paymentInf = true;
                        }else{
                            this.paymentInf = false;
                        }
                        if(res.data.taxPaymentType != "S"){
                            this.tariffInf = true;
                        }else{
                            this.tariffInf = false;
                        }
                    }else{
                        if(res.data.paytype != "1"){
                            this.paymentInf = true;
                        }else{
                            this.paymentInf = false;
                        }
                        if(res.data.taxPaymentType != "1" ){
                            this.tariffInf = true;
                        }else{
                            this.tariffInf = false;
                        }
                    }
                    //品牌
                    if(res.data.brand!=null){
                        this.brand = true;
                    }
                    //价格字段 顺丰和韵达单独处理
                    if("101" == res.data.expressCode || "108" == res.data.expressCode || "109" == res.data.expressCode){
                        this.pricetab = true;
                    }else{
                        this.pricetab = false;
                    }
                    this.shippingValidate.picktype=res.data.picktype=='1'?"提货":"配货";
                    this.shippingValidate.shipdate=new Date(this.shippingValidate.shipdate).format("yyyy-MM-dd");
                    if(this.shippingValidate.status == "0"){
                        this.fh = true;
                        this.boh = true;
                        this.beih = false;
                    }else if(this.shippingValidate.status == "1"){
                        this.qxfh = true;
                    }else if(this.shippingValidate.status == "2" ||this.shippingValidate.status == "3"){
                        this.beih = true;
                        this.boh = true;
                        this.fh = false;
                    }
                    this.shipdetailId = code;
                    this.currentshipdetailPage = 1;
                    this.shippingdetailData = this.shipdetailTableData(this.currentshipdetailPage,this.shipdetailpageSize);
                    this.shippingDetailModal = true;
                    this.$Message.destroy();
                    $(".shippingdetail").scroll();
                }).catch(err =>{
                    this.$Message.destroy();
                });
            },
            //发货明细
            shipdetailTableData (currentshipdetailPage,shipdetailpageSize) {
                let data = {
                    params: {
                        pageIndex : currentshipdetailPage,
                        pageSize : shipdetailpageSize
                    }
                };
                axios.get('/shippingDetail/'+this.shipdetailId,data).then(res => {
                    this.shippingdetailData = res.data.data;
                    if(this.shippingdetailData.length == '0'){
                        this.nodata = true;
                    }else{
                        this.nodata = false;
                    }
                    this.shipdetailtotal=res.data.total;
                    this.shipdetailpageTotal=Math.ceil(res.data.total / shipdetailpageSize);
                    this.$Message.destroy();
                }).catch(err =>{
                    this.$Message.destroy();
                });
            },
            //发货明细
            changeshipdetailPage:function(page){
                this.currentshipdetailPage = page;
                this.shippingdetailData = this.shipdetailTableData(this.currentshipdetailPage,this.shipdetailpageSize);
            },
            importdetailModal(){
                this.importModal = true;
                this.importupload = this.$store.state.url+'/box/batch?shippingId='+this.shippingValidate.id;
                this.fileList=[];
                this.shippingdetailData = this.shipdetailTableData(this.currentshipdetailPage,this.shipdetailpageSize);
            },
            handleFormatErrorimport(file){
                this.$Message.error('文件 ' + file.name + ' 格式不正确，请上传 xls 或 xlsx 格式。');
            },
            uploadSuccessimport(file){
                this.$Message.destroy();
                this.$Message.success('文件上传成功。');
                this.importModal = false;
                this.fileList=[];
                this.shippingdetailData = this.shipdetailTableData(this.currentshipdetailPage,this.shipdetailpageSize);
            },
            uploadErrorimport(file){
                this.$Message.destroy();
                this.$Message.error('文件上传失败。');
                this.fileList=[];
            },
            uploadprogressimport(file){
                this.$Message.loading({
                    content: '文件正在上传，请稍后......',
                    duration: 0
                });
            },
            //导入发货明细数据
            importdetailData(){

            },
            //导出发货明细数据
            exportdetailData(){
                this.$Message.loading({
                    content: '正在导出数据，请稍后......',
                    duration: 0
                });
                this.exportExl('/shippings/'+this.shippingValidate.id+'/excel',"发货明细.xls");
            },
            //拆分分箱数据
            chaifenfenxiangData(){
                this.$Message.loading({
                    content: '正在导出数据，请稍后......',
                    duration: 0
                });
                this.exportExl('/shippings/'+this.shippingValidate.id+'/splitbox/excel',"拆分分箱明细.xls");
            },
            //分箱导出数据
            exportfenxiangData(){
                this.$Message.loading({
                    content: '正在导出数据，请稍后......',
                    duration: 0
                });
                this.exportExl('/shippings/'+this.shippingValidate.id+'/boxs/excel',"分箱明细.xls");
            },
            //拆分导出数据
            exportchaifenData(){
                this.$Message.loading({
                    content: '正在导出数据，请稍后......',
                    duration: 0
                });
                this.exportExl('/shippings/'+this.shippingValidate.id+'/splits/excel',"拆分明细.xls");
            },
            exportExl(url,name){
                axios.get(url).then(res => {
                    const BOM = '\uFEFF';
                    // Add BOM to text for open in excel correctly
                    if (window.Blob && window.URL && window.URL.createObjectURL) {
                        const csvData = new Blob([BOM + res.data], { type: 'text/xls' });
                        const link = document.createElement('a');
                        link.download = name;
                        link.href = URL.createObjectURL(csvData);
                        link.target = '_blank';
                        document.body.appendChild(link);
                        link.click();
                        document.body.removeChild(link);
                    } else {
                        const link = document.createElement('a');
                        link.download =name;
                        link.href = 'data:attachment/xls;charset=utf-8,' + BOM + encodeURIComponent(res.data);
                        link.target = '_blank';
                        document.body.appendChild(link);
                        link.click();
                        document.body.removeChild(link);
                    }
                    this.$Message.destroy();
                }).catch(err =>{
                    this.$Message.destroy();
                    this.$Message.error({content: err,duration: 0,closable:true});
                });
            },
            //更改箱号
            editBoxno(item){
                this.boxnoModal=true;
                this.boxnoDetail.orderId = item.orderid;
                this.boxnoDetail.boxNo = item.boxno;
                this.boxnoDetail.shippingId = this.shippingValidate.id;
            },
            boxnoCancel(){
                this.boxnoModal=false;
                this.boxnoDetail.orderId = '';
                this.boxnoDetail.boxNo = '';
                this.boxnoDetail.shippingId = '';
            },
            boxnoOK(){
                this.boxnoLoading = true;
                var qs = require("qs");
                axios.put('/box/manual', this.boxnoDetail).then(res => {
                    this.boxnoLoading = false;
                    this.boxnoModal = false;
                    this.boxnoDetail.orderId = '';
                    this.boxnoDetail.boxNo = '';
                    this.boxnoDetail.shippingId = '';
                }).catch(err =>{
                    this.$Message.error({content: err,duration: 0,closable:true});
                    this.boxnoLoading = false;
                });
            },
            //删除一条发货信息
            deldetail(id){
                this.delModal=true;
                this.delId = id;
            },
            delOK(){
                this.delLoading = true;
                axios.delete('/shippingDetail/'+this.delId).then(res => {
                    this.delLoading = false;
                    this.delModal=false;
                    this.$Message.success('删除成功');
                    axios.get('/shippingDetail/'+this.shippingValidate.id).then(res => {
                        this.shippingdetailData = res.data.data;
                    }).catch(err =>{
                    });
                }).catch(err =>{
                    this.delLoading = false;
                    this.$Message.error({content: err,duration: 0,closable:true});
                });
            },
            delCancel() {
                this.delModal=false;
                this.delId = '';
            },
            //更改一条发货明细
            editdetail(row){
                this.editdetailModal = true;
                this.disabled = true;
                this.editdetailValidate.orderId = row.orderid;
            },
            //保存更改发货明细
            editsaveDetail (name) {
                this.modal_loading = true;
                this.$refs[name].validate((valid) => {
                    if (valid) {
                        var qs = require("qs");
                        axios.put('/shippingDetail', this.editdetailValidate).then(res => {
                            this.modal_loading = false;
                            this.editdetailModal = false;
                            this.$refs[name].resetFields();
                            this.$Message.success('编辑成功');
                            axios.get('/shippingDetail/'+this.shippingValidate.id).then(res => {
                                this.shippingdetailData = res.data.data;
                            }).catch(err =>{
                            });
                        }).catch(err =>{
                            this.$Message.error({content: err,duration: 0,closable:true});
                            this.modal_loading = false;
                        });
                    } else {
                        this.modal_loading = false;
                    }
                });
            },
            //清空发货明细
            cleardetail(name){
                this.$refs[name].resetFields();
            },
            //生成报文
            exportInvoice (row) {
                var template = "";
                if(row.username == "TMW"){
                    template = "invoice2"
                }else{
                    template = "invoice"
                }
                this.$Message.loading({
                    content: '正在导出数据，请稍后......',
                    duration: 0
                });
                this.exportExl('/shippings/'+row.id+'/'+template+'/excel',"报关单.xls");
            },
            //打印
            printShipping (row) {
                if (row.status == "1"||row.status == "6"||row.status == "7"||row.status=="8") {
                    if ("101" == row.expressCode) {
                        //顺丰打印
                        window.open("/printSF/"+row.id);
                    } else if ("102" == row.expressCode) {
                        this.$Message.success('联邦打印!');
                    } else if ("103" == row.expressCode) {
                        axios.get('shipping/'+row.id+'/print').then(res => {
                            var mainobj = new Object();
                            var subarr = [];
                            for(var i in res.data){
                                if(res.data[i][0] == "EXPRESS WORLDWIDE"){//副打印单
                                    var arr = res.data[i].join("@@@").split("Line@@@");
                                    var subobj = new Object();
                                    for(var j in arr){
                                        if(arr[j].indexOf("EXPRESS WORLDWIDE") == 0){//第一行
                                            var oneLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            subobj.oneObjName = oneLine[1];
                                            subobj.oneObjTime = oneLine[2];
                                            subobj.oneObjType = oneLine[3];
                                        }else if(arr[j].indexOf("From :") == 0){//第二行
                                            var twoLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            subobj.twoObjOne = twoLine[2];
                                            subobj.twoObjTwo = twoLine[3];
                                            subobj.twoObjThree = twoLine[4];
                                            subobj.twoObjFour = twoLine[5];
                                            subobj.twoObjFive = twoLine[6];
                                            subobj.twoObjSix = twoLine[7];
                                            subobj.twoObjSeven = twoLine[9];
                                        }else if(arr[j].indexOf("To :") == 0){//第三行
                                            var threeLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            subobj.threeObjOne = threeLine[2];
                                            subobj.threeObjTwo = threeLine[3];
                                            subobj.threeObjThree = threeLine[4];
                                            subobj.threeObjFour = threeLine[5];
                                            subobj.threeObjFive = threeLine[threeLine.length-5];
                                            if(subobj.threeObjFour == subobj.threeObjFive){
                                                subobj.threeObjFour = "";
                                            }
                                            subobj.threeObjSix = threeLine[threeLine.length-3];
                                            subobj.threeObjSeven = threeLine[threeLine.length-1];
                                        }else if(arr[j].indexOf(".") == 0){//第四行
                                            var fourLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            subobj.fourObjOne = fourLine[2];
                                        }else if(arr[j].indexOf("Time@@@Day") != -1){//第五行
                                            var fiveLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            subobj.fiveObjOne = fiveLine[0];
                                            subobj.fiveObjTwo = fiveLine[1];
                                            subobj.fiveObjThree = fiveLine[2];
                                        }else if(arr[j].indexOf("Ref:") == 0){//第六行
                                            var sixLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            subobj.sixObjOne = sixLine[0];
                                            subobj.sixObjTwo = sixLine[sixLine.length-3];
                                            subobj.sixObjThree = sixLine[sixLine.length-1];
                                        }else{//第七行
                                            var sevenLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            subobj.sevenObjOne = sevenLine[0];
                                            subobj.sevenObjOnename = sevenLine[1];
                                            subobj.sevenObjTwo = sevenLine[3];
                                            subobj.sevenObjTwoname = sevenLine[4];
                                            subobj.sevenObjThree = sevenLine[5];
                                            subobj.sevenObjThreename = sevenLine[6];
                                        }
                                    }
                                    subarr.push(subobj);
                                }else{//主打印单
                                    var arr = res.data[i].join("@@@").split("Line@@@");
                                    for(var j in arr){
                                        if(arr[j].indexOf("* ARCHIVE DOC *") == 0){//第一行
                                            var oneLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            mainobj.oneObjName = oneLine[1];
                                            mainobj.oneObjTime = oneLine[2];
                                            mainobj.oneObjType = oneLine[3];
                                        }else if(arr[j].indexOf("From :") == 0){//第二行
                                            var twoLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            mainobj.twoObjOne = twoLine[2];
                                            mainobj.twoObjTwo = twoLine[3];
                                            mainobj.twoObjThree = twoLine[4];
                                            mainobj.twoObjFour = twoLine[5];
                                            mainobj.twoObjFive = twoLine[6];
                                            mainobj.twoObjSix = twoLine[7];
                                            mainobj.twoObjSeven = twoLine[9];
                                        }else if(arr[j].indexOf("To :") == 0){//第三行
                                            var threeLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            mainobj.threeObjOne = threeLine[2];
                                            mainobj.threeObjTwo = threeLine[3];
                                            mainobj.threeObjThree = threeLine[4];
                                            mainobj.threeObjFour = threeLine[5];
                                            mainobj.threeObjFive = threeLine[threeLine.length-5];
                                            if(mainobj.threeObjFour == mainobj.threeObjFive){
                                                mainobj.threeObjFour = "";
                                            }
                                            mainobj.threeObjSix = threeLine[threeLine.length-3];
                                            mainobj.threeObjSeven = threeLine[threeLine.length-1];
                                        }else if(arr[j].indexOf(".") == 0){//第四行
                                            var fourLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            mainobj.fourObjOne = fourLine[2];
                                        }else if(arr[j].indexOf("Product:") == 0){//第五行
                                            var fiveLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            mainobj.fiveObjOne = fiveLine[1];
                                            mainobj.fiveObjTwo = fiveLine[4];
                                            mainobj.fiveObjThree = fiveLine[6];
                                        }else if(arr[j].indexOf("Ref:") == 0){//第六行
                                            var sixLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            mainobj.sixObjOne = sixLine[0];
                                            mainobj.sixObjTwo = sixLine[1];
                                            mainobj.sixObjThree = sixLine[sixLine.length-1];
                                            for(var six in sixLine){
                                                if(sixLine[six] == "Shpt Wght:"){
                                                    mainobj.sixObjFour = sixLine[Number(six)+1];
                                                }
                                                if(sixLine[six] == "Shipment Date:"){
                                                    mainobj.sixObjFive = sixLine[Number(six)+1];
                                                }
                                                if(sixLine[six] == "# of Pieces"){
                                                    mainobj.sixObjSix = sixLine[Number(six)+1];
                                                }
                                            }
                                        }else if(arr[j].indexOf("License Plates of pieces in shipment") == 0){//第八行
                                            var eightLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            mainobj.eightObjOne = eightLine.splice(1,eightLine.length-2);
                                        }else{//第七行
                                            var sevenLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                            mainobj.sevenObjOne = sevenLine[0];
                                            mainobj.sevenObjOnename = sevenLine[1];
                                        }
                                    }
                                }
                            }
                            sessionStorage.setItem("mainobj",JSON.stringify(mainobj));
                            sessionStorage.setItem("subarr",JSON.stringify(subarr));
                            window.open("/printDHL/"+row.id);
                        }).catch(err =>{
                            this.$Message.error({content: err,duration: 0,closable:true});
                        })
                    }else if ("104" == row.expressCode){
                        window.open("/printUPS/"+row.id);
                    }else if ("109" == row.expressCode) {
                        window.open("/printEMS/"+row.id);
                    }
                } else {
                    this.$Message.error('发货状态可打印!');
                }
            },
            upsCancel(){
                this.upsprintList = [];
                this.upsModal = false;
            },
            printUPS(imgurl){
                sessionStorage.setItem("imgurl",imgurl);
                window.open("/printUPS");
            },
            printOK() {
                if ("101" == this.qdprintdata.expresscode) {
                    //顺丰打印
                    this.qdprintmodal = false;
                    window.open("/printSF/"+this.qdprintdata.id);
                } else if ("102" == this.qdprintdata.expresscode) {
                    this.qdprintmodal = false;
                    this.$Message.success('联邦打印!');
                } else if ("103" == this.qdprintdata.expresscode) {
                    this.qdprintmodal = false;
                    axios.get('shipping/'+this.qdprintdata.id+'/print').then(res => {
                        var mainobj = new Object();
                        var subarr = [];
                        for(var i in res.data){
                            if(res.data[i][0] == "EXPRESS WORLDWIDE"){//副打印单
                                var arr = res.data[i].join("@@@").split("Line@@@");
                                var subobj = new Object();
                                for(var j in arr){
                                    if(arr[j].indexOf("EXPRESS WORLDWIDE") == 0){//第一行
                                        var oneLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        subobj.oneObjName = oneLine[1];
                                        subobj.oneObjTime = oneLine[2];
                                        subobj.oneObjType = oneLine[3];
                                    }else if(arr[j].indexOf("From :") == 0){//第二行
                                        var twoLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        subobj.twoObjOne = twoLine[2];
                                        subobj.twoObjTwo = twoLine[3];
                                        subobj.twoObjThree = twoLine[4];
                                        subobj.twoObjFour = twoLine[5];
                                        subobj.twoObjFive = twoLine[6];
                                        subobj.twoObjSix = twoLine[7];
                                        subobj.twoObjSeven = twoLine[9];
                                    }else if(arr[j].indexOf("To :") == 0){//第三行
                                        var threeLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        subobj.threeObjOne = threeLine[2];
                                        subobj.threeObjTwo = threeLine[3];
                                        subobj.threeObjThree = threeLine[4];
                                        subobj.threeObjFour = threeLine[5];
                                        subobj.threeObjFive = threeLine[threeLine.length-5];
                                        if(subobj.threeObjFour == subobj.threeObjFive){
                                            subobj.threeObjFour = "";
                                        }
                                        subobj.threeObjSix = threeLine[threeLine.length-3];
                                        subobj.threeObjSeven = threeLine[threeLine.length-1];
                                    }else if(arr[j].indexOf(".") == 0){//第四行
                                        var fourLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        subobj.fourObjOne = fourLine[2];
                                    }else if(arr[j].indexOf("Time@@@Day") != -1){//第五行
                                        var fiveLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        subobj.fiveObjOne = fiveLine[0];
                                        subobj.fiveObjTwo = fiveLine[1];
                                        subobj.fiveObjThree = fiveLine[2];
                                    }else if(arr[j].indexOf("Ref:") == 0){//第六行
                                        var sixLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        subobj.sixObjOne = sixLine[0];
                                        subobj.sixObjTwo = sixLine[sixLine.length-3];
                                        subobj.sixObjThree = sixLine[sixLine.length-1];
                                    }else{//第七行
                                        var sevenLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        subobj.sevenObjOne = sevenLine[0];
                                        subobj.sevenObjOnename = sevenLine[1];
                                        subobj.sevenObjTwo = sevenLine[3];
                                        subobj.sevenObjTwoname = sevenLine[4];
                                        subobj.sevenObjThree = sevenLine[5];
                                        subobj.sevenObjThreename = sevenLine[6];
                                    }
                                }
                                subarr.push(subobj);
                            }else{//主打印单
                                var arr = res.data[i].join("@@@").split("Line@@@");
                                for(var j in arr){
                                    if(arr[j].indexOf("* ARCHIVE DOC *") == 0){//第一行
                                        var oneLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        mainobj.oneObjName = oneLine[1];
                                        mainobj.oneObjTime = oneLine[2];
                                        mainobj.oneObjType = oneLine[3];
                                    }else if(arr[j].indexOf("From :") == 0){//第二行
                                        var twoLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        mainobj.twoObjOne = twoLine[2];
                                        mainobj.twoObjTwo = twoLine[3];
                                        mainobj.twoObjThree = twoLine[4];
                                        mainobj.twoObjFour = twoLine[5];
                                        mainobj.twoObjFive = twoLine[6];
                                        mainobj.twoObjSix = twoLine[7];
                                        mainobj.twoObjSeven = twoLine[9];
                                    }else if(arr[j].indexOf("To :") == 0){//第三行
                                        var threeLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        mainobj.threeObjOne = threeLine[2];
                                        mainobj.threeObjTwo = threeLine[3];
                                        mainobj.threeObjThree = threeLine[4];
                                        mainobj.threeObjFour = threeLine[5];
                                        mainobj.threeObjFive = threeLine[threeLine.length-5];
                                        if(mainobj.threeObjFour == mainobj.threeObjFive){
                                            mainobj.threeObjFour = "";
                                        }
                                        mainobj.threeObjSix = threeLine[threeLine.length-3];
                                        mainobj.threeObjSeven = threeLine[threeLine.length-1];
                                    }else if(arr[j].indexOf(".") == 0){//第四行
                                        var fourLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        mainobj.fourObjOne = fourLine[2];
                                    }else if(arr[j].indexOf("Product:") == 0){//第五行
                                        var fiveLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        mainobj.fiveObjOne = fiveLine[1];
                                        mainobj.fiveObjTwo = fiveLine[4];
                                        mainobj.fiveObjThree = fiveLine[6];
                                    }else if(arr[j].indexOf("Ref:") == 0){//第六行
                                        var sixLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        mainobj.sixObjOne = sixLine[0];
                                        mainobj.sixObjTwo = sixLine[1];
                                        mainobj.sixObjThree = sixLine[sixLine.length-1];
                                        for(var six in sixLine){
                                            if(sixLine[six] == "Shpt Wght:"){
                                                mainobj.sixObjFour = sixLine[Number(six)+1];
                                            }
                                            if(sixLine[six] == "Shipment Date:"){
                                                mainobj.sixObjFive = sixLine[Number(six)+1];
                                            }
                                            if(sixLine[six] == "# of Pieces"){
                                                mainobj.sixObjSix = sixLine[Number(six)+1];
                                            }
                                        }
                                    }else if(arr[j].indexOf("License Plates of pieces in shipment") == 0){//第八行
                                        var eightLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        mainobj.eightObjOne = eightLine.splice(1,eightLine.length-2);
                                    }else{//第七行
                                        var sevenLine = arr[j].substring(0,arr[j].length-3).split("@@@");
                                        mainobj.sevenObjOne = sevenLine[0];
                                        mainobj.sevenObjOnename = sevenLine[1];
                                    }
                                }
                            }
                        }
                        sessionStorage.setItem("mainobj",JSON.stringify(mainobj));
                        sessionStorage.setItem("subarr",JSON.stringify(subarr));
                        window.open("/printDHL/"+this.qdprintdata.id);
                    }).catch(err =>{
                        this.$Message.error({content: err,duration: 0,closable:true});
                    });
                }else if ("104" == this.qdprintdata.expresscode){
                    this.qdprintmodal = false;
                    window.open("/printUPS/"+this.qdprintdata.id);
                }else if ("109" == this.qdprintdata.expresscode) {
                    this.qdprintmodal = false;
                    window.open("/printEMS/"+this.qdprintdata.id);
                }
            },
            printCancel(){
                this.qdprintmodal = false;
                this.qdprintdata = {};
            },
            exempt(){
                window.print();
            },
            //仓库维护
            edictStorehouse() {
                this.depotSearchForm={ company: '',contact: '',inuse: ' ',expressid: ' '};
                this.currentdepotPage = 1;
                this.depotData = this.depotTableData(this.depotSearchForm,this.currentdepotPage,this.depotpageSize);
                this.maindepot = true;
            },
            //查询仓库维护数据，条件，当前页，每页显示多少条
            depotTableData (formData,currentdepotPage,depotpageSize) {
                this.depotspinShow=true;
                this.depotShow = false;
                var company = formData.company;//仓库公司
                var contact = formData.contact;//联系人
                var expressid = "";//快递公司id
                if(formData.expressid == "all"){
                    expressid = "";
                }else{
                    expressid = formData.expressid;
                }
                var inuse = formData.inuse;//是否启用（0否，1是）
                let data = {
                    params: {
                        pageIndex : currentdepotPage,
                        pageSize : depotpageSize,
                        company : company,
                        contact : contact,
                        expressid : expressid,
                        inuse : inuse
                    }
                };
                axios.get('/storages',data).then(res => {
                    this.depottotal=res.data.total;
                    this.depotpageTotal=Math.ceil(res.data.total / depotpageSize);
                    this.depotData = res.data.data;
                    this.depotspinShow=false;
                    this.depotShow = true;
                }).catch(err =>{
                });
            },
            //改变仓库维护页数
            changedepotPage:function(page){
                this.currentdepotPage = page;
                this.depotData = this.depotTableData(this.depotSearchForm,this.currentdepotPage,this.depotpageSize);
            },
            //新增仓库维护
            addExDepot() {
                this.addDepot = true;
                this.editDepot = false;
                this.addDepotModal=true;
            },
            //保存新增仓库
            saveDepot(name){
                this.modal_loading = true;
                this.$refs[name].validate((valid) => {
                    if (valid) {
                        axios.post('/storage', this.addExDepotValidate).then(res => {
                            this.modal_loading = false;
                            this.addDepotModal = false;
                            this.addDepot = false;
                            this.$Message.success('添加成功');
                            this.$refs[name].resetFields();
                            this.depotData = this.depotTableData(this.depotSearchForm,this.currentdepotPage,this.depotpageSize);
                        }).catch(err =>{
                            this.$Message.error({content: err,duration: 0,closable:true});
                            this.modal_loading = false;
                        });
                    } else {
                        this.modal_loading = false;
                    }
                })
            },
            //根据ID编辑仓库
            editExDepot(column) {
                this.addDepot = false;
                this.editDepot = true;
                axios.get('/storage/ '+ column).then(res => {
                    this.addExDepotValidate = res.data;
                    this.addDepotModal=true;
                }).catch(err =>{
                })
            },
            //保存编辑仓库
            editSaveDepot (name) {
                this.modal_loading = true;
                this.$refs[name].validate((valid) => {
                    if (valid) {
                        axios.put('/storage', this.addExDepotValidate).then(res => {
                            this.modal_loading = false;
                            this.addDepotModal = false;
                            this.editDepot = false;
                            this.$Message.success('编辑成功');
                            this.$refs[name].resetFields();
                            this.depotData = this.depotTableData(this.depotSearchForm,this.currentdepotPage,this.depotpageSize);
                        }).catch(err =>{
                            this.$Message.error({content: err,duration: 0,closable:true});
                            this.modal_loading = false;
                        });
                    } else {
                        this.modal_loading = false;
                    }
                });
            },
            //仓库条件查询
            depotFormSearch(){
                this.currentdepotPage = 1;
                this.depotData = this.depotTableData(this.depotSearchForm,this.currentdepotPage,this.depotpageSize);
            },
            //清空新增仓库
            clearDepot(name){
                this.$refs[name].resetFields();
            },
            //关闭新增仓库
            cancelDepot(name){
                this.addDepot = false;
                this.editDepot = false;
                this.addDepotModal = false;
                this.$refs[name].resetFields();
            },
            //仓库维护改变状态
            toggleDepotFav (row) {
                row.inuse = row.inuse == '0' ?'1' : '0';
                axios.put('/storage', row).then(res => {
                    this.depotData[row._index].inuse = this.depotData[row._index].inuse == '0' ?'1' : '0';
                }).catch(err =>{
                });
            },
            //运单维护
            tendwaybill(){
                this.waybillModal = true;
            },
            //箱型维护
            edictBoxDict(){
                this.boxnumForm={boxname: '', inuse: ' '};
                this.currentboxnumPage =1;
                this.boxnumData = this.boxnumTableData(this.boxnumForm,this.currentboxnumPage,this.boxnumpageSize);
                this.boxnumModal = true;

            },
            //查询箱型维护数据，条件，当前页，每页显示多少条
            boxnumTableData (formboxnumData,currentboxnumPage,boxnumpageSize) {
                this.boxnumShow = false;
                var boxname = formboxnumData.boxname;//箱子型号名称
                var inuse = formboxnumData.inuse;//是否启用（0否，1是）
                let data = {
                    params: {
                        pageIndex : currentboxnumPage,
                        pageSize : boxnumpageSize,
                        boxname : boxname,
                        inuse : inuse
                    }
                };
                axios.get('/boxs',data).then(res => {
                    this.boxnumtotal=res.data.total;
                    this.boxnumpageTotal=Math.ceil(res.data.total / boxnumpageSize);
                    this.boxnumData = res.data.data;
                    this.boxnumShow = true;
                }).catch(err =>{
                });
            },
            //箱型维护条件查询
            boxnumSearch (value) {
                this.currentboxnumPage = 1;
                this.boxnumData = this.boxnumTableData(this.boxnumForm,this.currentboxnumPage,this.boxnumpageSize);
            },
            //改变箱型维护页数
            changeboxnumPage:function(page){
                this.currentboxnumPage = page;
                this.boxnumData = this.boxnumTableData(this.boxnumForm,this.currentboxnumPage,this.boxnumpageSize);
            },
            //新增箱型维护
            addBoxNum() {
                this.addBox = true;
                this.editBox = false;
                this.addboxnumModal=true;
            },
            //根据ID编辑箱号
            editBoxnum(column) {
                this.addBox = false;
                this.editBox = true;
                axios.get('/box/ '+ column).then(res => {
                    this.addBoxnumValidate = res.data;
                    this.addBoxnumValidate.height == null ? this.addBoxnumValidate.height:this.addBoxnumValidate.height=this.addBoxnumValidate.height.toString();
                    this.addBoxnumValidate.weight == null ? this.addBoxnumValidate.weight:this.addBoxnumValidate.weight=this.addBoxnumValidate.weight.toString();
                    this.addBoxnumValidate.width == null ? this.addBoxnumValidate.width:this.addBoxnumValidate.width=this.addBoxnumValidate.width.toString();
                    this.addBoxnumValidate.len == null ? this.addBoxnumValidate.len:this.addBoxnumValidate.len=this.addBoxnumValidate.len.toString();
                    this.addboxnumModal=true;
                }).catch(err =>{
                })
            },
            //保存编辑箱号
            editSaveBox (name) {
                this.modal_loading = true;
                this.$refs[name].validate((valid) => {
                    if (valid) {
                        axios.put('/box',this.addBoxnumValidate).then(res => {
                            this.modal_loading = false;
                            this.addboxnumModal = false;
                            this.editBox = false;
                            this.$Message.success('编辑成功');
                            this.$refs[name].resetFields();
                            this.boxnumData = this.boxnumTableData(this.boxnumForm,this.currentboxnumPage,this.boxnumpageSize);
                        }).catch(err =>{
                            this.$Message.error({content: err,duration: 0,closable:true});
                            this.modal_loading = false;
                        });
                    } else {
                        this.modal_loading = false;
                    }
                });
            },
            //保存新增箱号
            saveBox(name){
                this.modal_loading = true;
                this.$refs[name].validate((valid) => {
                    if (valid) {
                        axios.post('/box', this.addBoxnumValidate).then(res => {
                            this.modal_loading = false;
                            this.addboxnumModal = false;
                            this.addBox = false;
                            this.$Message.success('添加成功');
                            this.$refs[name].resetFields();
                            this.boxnumData = this.boxnumTableData(this.boxnumForm,this.currentboxnumPage,this.boxnumpageSize);
                        }).catch(err =>{
                            this.$Message.error({content: err,duration: 0,closable:true});
                            this.modal_loading = false;
                        });
                    } else {
                        this.modal_loading = false;
                    }
                })
            },
            //清空箱号
            clearBox(name){
                this.$refs[name].resetFields();
            },
            //关闭新增箱号
            cancelBox(name){
                this.addBox = false;
                this.editBox = false;
                this.addboxnumModal = false;
                this.$refs[name].resetFields();
            },
            //箱型维护改变状态
            toggleBoxFav (row) {
                row.inuse = row.inuse == '0' ?'1' : '0';
                axios.put('/box', row).then(res => {
                    this.boxnumData[row._index].inuse = this.boxnumData[row._index].inuse == '0' ?'1' : '0';
                }).catch(err =>{
                });
            },
            //导出明细
            exportbody(){
                this.exportModal=true;
                this.modal_loading = false;
            },
            //确认导出明细
            exportDetail(name){
                this.modal_loading = true;
                this.$refs[name].validate((valid) => {
                    if (valid) {
                        axios.get('/shippings/excel?expressCode='+this.exportValidate.expressCode+'&shipDate='+new Date((new Date(this.exportValidate.shipdate)).getTime()).format("yyyy-MM-dd")).then(res => {
                            const BOM = '\uFEFF';
                            var express =  this.exportValidate.expressCode == "101" ? '顺丰速递' : this.exportValidate.expressCode == "102" ? '联邦快递': this.exportValidate.expressCode == "103" ? 'DHL快递': this.exportValidate.expressCode == "104" ? 'UPS快递': this.exportValidate.expressCode == "106" ? '自提': this.exportValidate.expressCode == "107" ? 'TNT快递': this.exportValidate.expressCode == "109" ? 'EMS快递':'';
                            var shipDate = new Date((new Date(this.exportValidate.shipdate)).getTime()).format("yyyy-MM-dd");
                            // Add BOM to text for open in excel correctly
                            if (window.Blob && window.URL && window.URL.createObjectURL) {
                                const csvData = new Blob([BOM + res.data], { type: 'text/xls' });
                                const link = document.createElement('a');
                                link.download = express+shipDate+".xls";
                                link.href = URL.createObjectURL(csvData);
                                link.target = '_blank';
                                document.body.appendChild(link);
                                link.click();
                                document.body.removeChild(link);
                            } else {
                                const link = document.createElement('a');
                                link.download = express+shipDate+".xls";
                                link.href = 'data:attachment/xls;charset=utf-8,' + BOM + encodeURIComponent(res.data);
                                link.target = '_blank';
                                document.body.appendChild(link);
                                link.click();
                                document.body.removeChild(link);
                            }
                            this.modal_loading = false;
                        }).catch(err =>{
                            this.$Message.error({content: err,duration: 0,closable:true});
                        });
                    } else {
                        this.modal_loading = false;
                    }
                });

            },
            cancelExport(name){
                this.$refs[name].resetFields();
            },
            //查看签名
            seeAutograph (column) {
                this.autopraghModal = true;
                this.signatureId=column;
                axios.get('/shipping/'+column+'/signature').then(res => {
                    this.customerSign = res.data;
                }).catch(err =>{
                    this.$Message.error({content: err,duration: 0,closable:true});
                });
            },
            //清空签名
            clearAutopragh(){
                this.autopraghModal = false;
                this.customerSign = '';
            },
            //重新签名
            resign(){
                axios.put('/shippings/'+this.signatureId+'/signature').then(res => {
                    this.autopraghModal = false;
                    this.shippingData = this.shippingTableData(this.shippingForm,this.currentPage,this.pageSize);
                }).catch(err =>{
                    this.$Message.error({content: err,duration: 0,closable:true});
                });
            },
            //物流编号详情
            showLogistics(code){
                this.$Message.loading({
                    content: '正在加载数据，请稍后......',
                    duration: 0
                });
                axios.get('/shipping/'+code).then(res => {
                    this.logisticsValidate = res.data;
                    if(res.data.taxPaymentType == 1){
                        this.logisticsValidate.taxPaymentType = "发货方付";
                    }else if(res.data.taxPaymentType == 2){
                        this.logisticsValidate.taxPaymentType = "收货方付";
                    }else if(res.data.taxPaymentType == 3){
                        this.logisticsValidate.taxPaymentType = "第三方付";
                    }
                    if(res.data.status=="0"){
                        this.statusColor="#657180";
                        this.notrack = true;
                        this.track = false;
                        this.logisticsValidate.status = "备货";
                    }
                    if(res.data.status=="1"){
                        this.statusColor="#657180";
                        this.notrack = false;
                        this.track = true;
                        this.logisticsValidate.status = "发货";
                    }
                    if(res.data.status=="8"){
                        this.statusColor="#657180";
                        this.notrack = false;
                        this.track = true;
                        this.logisticsValidate.status = "待签收";
                    }
                    if(res.data.status=="2"){
                        this.statusColor="red";
                        this.notrack = true;
                        this.track = false;
                        this.logisticsValidate.status = "审核";
                    }
                    if(res.data.status=="3"){
                        this.statusColor="red";
                        this.notrack = true;
                        this.track = false;
                        this.logisticsValidate.status = "已审核";
                    }if(res.data.status=="6"){
                        this.statusColor="#657180";
                        this.notrack = false;
                        this.track = true;
                        this.logisticsValidate.status = "已签收";
                    }if(res.data.status=="7"){
                        this.statusColor="#657180";
                        this.notrack = false;
                        this.track = true;
                        this.logisticsValidate.status = "已收货";
                    }
                    //支付方式和关税类型
                    axios.get('/logisticsDict',{params: {expressCode : res.data.expressCode,categoryid:2}}).then(res => {
                        this.paytypeList=res.data;
                        this.taxPaymentTypeList=res.data;
                        for(var i in res.data){
                            if(res.data[i].code == this.logisticsValidate.paytype)　{
                                this.logisticsValidate.paytypename = res.data[i].name;
                            }
                            if(res.data[i].code == this.logisticsValidate.taxPaymentType)　{
                                this.logisticsValidate.taxPaymentTypeName = res.data[i].name;
                            }
                        }
                    }).catch(err =>{
                    });
                    //快递方式
                    axios.get('/logisticsDict',{params: {expressCode : res.data.expressCode,categoryid:3}}).then(res => {
                        for(var i in res.data){
                            if(res.data[i].code == this.logisticsValidate.producttype)　{
                                this.logisticsValidate.producttypename = res.data[i].name;
                            }
                        }
                    }).catch(err =>{
                    });
                    if(res.data.expressCode == "106"){//自提不能查看运单号
                        this.notrack = true;
                        this.track = false;
                    }
                    if(res.data.createtime != null && res.data.createtime != ""){
                        this.logisticsValidate.createtime =  new Date(res.data.createtime).format("yyyy-MM-dd hh:mm:ss");
                    }
                    if(res.data.shipdate != null && res.data.shipdate != ""){
                        this.logisticsValidate.shipdate =  new Date(res.data.shipdate).format("yyyy-MM-dd");
                    }
                    if(res.data.pickuptime != null && res.data.pickuptime != ""){
                        this.logisticsValidate.pickuptime =  new Date(res.data.pickuptime).format("yyyy-MM-dd hh:mm:ss");
                    }
                    if(res.data.signintime != null && res.data.signintime != ""){
                        this.logisticsValidate.signintime =  new Date(res.data.signintime).format("yyyy-MM-dd hh:mm:ss");
                    }
                    if(res.data.confirmtime != null && res.data.confirmtime != ""){
                        this.logisticsValidate.confirmtime =  new Date(res.data.confirmtime).format("yyyy-MM-dd hh:mm:ss");
                    }
                    if(res.data.createtime != null && res.data.createtime != ""){
                        this.logisticsValidate.createtime =  new Date(res.data.createtime).format("yyyy-MM-dd hh:mm:ss");
                    }
                    this.logisticsValidate.expressName =  res.data.expressCode == "101" ? '顺丰速递' : res.data.expressCode == "102" ? '联邦快递': res.data.expressCode == "103" ? 'DHL快递': res.data.expressCode == "104" ? 'UPS快递': res.data.expressCode == "105" ? '圆通快递': res.data.expressCode == "106" ? '自提': res.data.expressCode == "107" ? 'TNT快递': res.data.expressCode == "108" ? '韵达快递': res.data.expressCode == 109 ? 'EMS快递':'';
                    axios.get('/shippingDetail/'+code).then(res => {
                        this.logisticsDetailData = res.data.data;
                        this.$Message.destroy();
                        this.logisticsModal = true;
                        $(".logisticsdetail").scroll();
                    }).catch(err =>{
                        this.$Message.destroy();
                    });
                }).catch(err =>{
                });
            },
            //关闭物流编号详情
            clearLogistics(name){
                this.logisticsModal = false;
                this.$refs[name].resetFields();
                this.logisticsDetailData = [];
                sessionStorage.setItem("logisticsdetailScrollTop","YES")
            },
            //根据快递单号查询物流信息
            trackExpress(column){
                this.logDetailModal = true;
                axios.get('/api/tracking/'+column).then(res => {
                    this.logDetailData = res.data;
                }).catch(err =>{

                });
            },
            //物流单号详情
            logDetail () {
                this.logDetailModal = false;
            },
            exportWaybill(){
                const link = document.createElement('a');
                link.download = "模板";
                link.href = '/src/file/uploadShip.xls';
                link.target = '_blank';
                document.body.appendChild(link);
                link.click();
                document.body.removeChild(link);
            },
            handleFormatError(file){
                this.$Message.error('文件 ' + file.name + ' 格式不正确，请上传 xls 或 xlsx 格式。');
            },
            uploadSuccess(file){
                this.$Message.destroy();
                this.$Message.success('文件上传成功。');
                this.waybillModal = false;
                this.fileList=[];
            },
            uploadError(file){
                this.$Message.destroy();
                this.$Message.error('文件上传失败。');
                this.fileList=[];
            },
            uploadprogress(file){
                this.$Message.loading({
                    content: '文件正在上传，请稍后......',
                    duration: 0
                });
            },
            //计算运费
            getTotalPrice(){
                if(this.shippingValidate.expressCode == "101" || this.shippingValidate.expressCode == "109"){
                    var city = "";
                    var expressType = "";
                    if(this.shippingValidate.expressCode == "101"){
                        if(this.shippingValidate.producttype == "1"  || this.shippingValidate.producttype == "5" || this.shippingValidate.producttype == "37"){
                            expressType = 0;
                        }else{
                            expressType = 1;
                        }
                        if(this.shippingValidate.city == "连云港市" || this.shippingValidate.city == "徐州市" || this.shippingValidate.city == "宿迁市"){
                            city = this.shippingValidate.city;
                        }
                    }
                    if(this.shippingValidate.weight != ""){
                        let data = {
                            params: {
                                code : this.shippingValidate.expressCode,
                                prince : this.shippingValidate.province,
                                city : city,
                                expressType : expressType,
                                weight : this.shippingValidate.weight,
                                boxid:this.shippingValidate.boxid
                            }
                        };
                        axios.get('/shipping/freight',data).then(res => {
                            this.shippingValidate.price = res.data.totalPrice.toString();
                        }).catch(err =>{
                        })
                    }

                }
            }
        }
    }
</script>